You can easily validate a phone number in Vue.js without using any external library. Below I've written a code which you may follow to learn how to do it without…
How to create a logger in JavaScript | Example
You have multiple choices to choose from for a logger, thanks to NPM. However, you can also create your own logger with just a bit of code. Here's an example…
Create / populate an array with random words in JavaScript
Earlier I've written an article on how you can populate an array with numbers in JavaScript. Here in this article we're learn how we can populate an array with random…
How to create an array with N numbers in JavaScript?
There are multiple ways to create or fill an array with N numbers in JavaScript. Here I'm showing some of the most popular ways. 1. Using the fill() method This…
How to create a draggable grid in Vue.js | Example
We can easily create a draggagle container / calendar grid in Vue.js, thanks to vue-js-grid. To start building the grid, you'd first need to install the npm package. To do…
How to define nested routes in Vue.js | Example
You can define nested routes in Vue.js (using vue-router) by chaining each of the routes on the root route. For instance, if there's a route named user/gautam, you can nest…
How to create a drag and drop list in Vue.js | Example
You can easily create a drag-and-drop list where you can drag one item and drop it in a different position in within the list. The fastest and easiest way to…
How to register a component locally in Vue.js | Example
Earlier we've seen how we can register a component globally so that we don't have to import it everywhere. However, with that approach, we include the component code everywhere even…
How to use a component without importing in Vue.js | Example
You can use a component anywhere in your application without importing by registering the component globally. You should keep in mind it's drawback though. When you register a component globally,…
