Different ways and correct way to delete an array .

Learn about what is the right way to delete an array in Javascript. Let’s create an Array let array = [1,2,3,4,5]; First way to delete an array is , referencing to a new empty array array = []; Let’s look an example var array1 = [1,2,3,4,5]; var array2 = array1; array1[0] = 100; array2[0]; //100 because …

Creating a toggle switch in CSS.

Awesome people build awesome 😎 things using css. Let’s create an input checkbox with label, so that we can change the label as switch and turn on the switch when the checkbox is checked and turn off when it is unchecked. <input type=”checkbox” id=”toggle” class=”checkbox” /> <label for=”toggle” class=”switch”></label> The label is placed below the …

The Complete Reference for JavaScript Arrays

Learn all the methods available to Arrays in Javascript. Different ways of creating an array var array = []; var array = Array(); var array = Array(3); // array of length 3 var array = new Array() var array = new Array(3) // array of length 3 1. Array.from() The Array.from method creates a new shallow …

Draw an image in canvas using Javascript ⌨️

We will create an app that allows user to upload an image and then we will display it in the canvas. First let’s create a file inputbox . Also create a canvas to display the image. <div> <input type=”file” id=”fileinput” accept = “image/*”> </div> <canvas id= “canvas”></canvas> type = file ; to say that the input-box accepts …

Creating a awesome 😎 underline text effect in CSS

Creating awesome stuffs in css is easy. So let’s create an awesome underline effect. Let’s create an para <p class=”underline”> Javascript Jeep 🚙 🚘 is awesome 😎 </p> Let’s add the position property to the para to relative , with that we can make use of ::after pseudo class and create a underline like shape . .underline { …

Creating an awesome Tooltip in css.

Awesome tooltips are made by crazy peoples. First let’s create a button . <button class = “button”> Button </button> Add some style to it, to make the button looks great, .button { position: relative; background: #E5C388; padding: 10px; border-radius: 4px; border: none; text-transform: uppercase; font-weight: bold; color: white;} The position property of button is set to …

Creating custom scrollbar in css

Default scrollbars are boring so let’s try building a awesome 😎 custom scrollbar using css. First we need to create a container with some text . <div class=”custom-scrollbar”> <p> “Doctors are just the same as lawyers; the only difference is that lawyers merely rob you, whereas doctors rob you and kill you too.” <hr> “Wine is …

Highlight text on selection in css

Create an awesome effect on selecting text using css. First we need to create a para with some text. <p class=”highlight-text”>Select the text to see magic . </p> Now let’s add a ::selection pseudo selector on an element to style text within it when selected. .highlight-text ::selection { background : #738BFA; color : white; } To …

Design a site like this with WordPress.com
Get started