Learn about how to use and when to use Set in JavaScript. The Set object allows you to create a collection of unique values(each value can occur only once). Set can contain any type of value (primitives or object reference). Set stores elements in the insertion order. The Set doesn’t contain’s keys 🔑 like a …
Category Archives: Uncategorized
Best Resources to find select the beautiful gradient for front-end developers.
List of websites where you can select gradient for your websites. Gradient for frontend developers. UIGradient UIGradient is a community contributed collection of beautiful multi-color gradients. You can easily generate gradients , rotate and download the gradient as image . They also provide some open source libraries for iOS, react, etc., .Link to their repo is here 2.ColorSpace …
Continue reading “Best Resources to find select the beautiful gradient for front-end developers.”
A Simple Introduction to the ES6 Map Data Structure in JavaScript
A Map is a collection of key🔑 — value pairs, similar to an object. It stores the key🔑 — value pairs in the insertion order. We can create a Map by passing an iterable object whose elements are in the form of key🔑 — value (Eg. [ [1,”one”], [2,”two”] ] ), or you can create an empty Map, then insert entries. …
Continue reading “A Simple Introduction to the ES6 Map Data Structure in JavaScript”
Javascript Date and Time in Detail
Learn about date and time in Javascript by creating some cool 😎 stuffs Javascript has a built-in Date object to handle all the time and date related operations. For example, you can display the current date/time, create a calendar, build a Pomodoro timer, code out a 🛑 stop-watch, and much more. Creating a Date Object We can …
WebAssembly Part 3 : Different ways to call the exported function in WebAssembly.
How to use ccall, cwrap in emscripten to call the exported function like Javascript functions. This is Part-3 of WebAssembly Tutorial , You can read Part 1 and Part 2 , which gives you the picture of what is webAssembly. Let’s write a simple C++ program with some functions // test.cpp #include<iostream> using namespace std; extern “C” …
Continue reading “WebAssembly Part 3 : Different ways to call the exported function in WebAssembly.”
WebAssembly Part 2 : Writing our first calculator program
In this tutorial we will learn how to create a calculator in WebAssembly. If you aren’t aware of WebAssembly then you can learn here . First let’s write our C program. // calculator.cpp #include<stdio.h> extern “C” { double calculate(double num1, double num2, int operation) { double result = 0; switch(operation) { case 1 : result = …
Continue reading “WebAssembly Part 2 : Writing our first calculator program”
WebAssembly → Part 1 :Introduction to WebAssembly.
WebAssembly satisfies every developers desire 🤩 of writing ✍️ efficient code. If you’re a frontend developer👨 , definitely you spend more time with javascript 👨🏾💻 than your wife 👰. We always try to write high performance ⚡️code . But Javascript doesn’t allow us to do that in some cases, where the performance can still be improved. One …
Continue reading “WebAssembly → Part 1 :Introduction to WebAssembly.”
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 …
Continue reading “Different ways and correct way to delete an array .”
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 …
Continue reading “The Complete Reference for JavaScript Arrays”