-
Don’t complicate VS Code- Use just these extensions as a web dev.
If you’re a web developer, or aspiring to be, just use these few extensions. Don’t confuse yourself by downloading dozens of unnecessary extensions. These are the only ones you need : ESLint The key feature of the ESLint VS Code extension is that it provides real-time feedback on your code by underlining issues directly in…
-
Stateless API vs Stateful API : Meaning and Usages
Stateless APIs In case of stateless APIs, each request from a client to the server must contain all the information needed to understand and process the request. The server does not store any session information about the client. Here, each request is independent and the server does not retain any info about previous requests. For…
-
10 Essential JavaScript concepts to learn for Absolute Beginners
JavaScript is a very dynamic and versatile programming language that has revolutionised the web development process. It was created by Brendan Eich in 1995. JavaScript adds interactivity to a website by providing ways to manipulate Document Object Model (DOM) in web browsers. Over a period JavaScript has evolved into a full fledged programming language that…
-
Create a button which displays a pop-up and pop-out window using CSS and JavaScript
We’ll create a button which shows a pop-up and pop-out window when you click on the button. For this we’ll use a JavaScript function which will be linked to the HTML using onClick keyword on the HTML linked to the button. Here’s the code : Next, the code block below, note that the popupWindow() function…
-
Dark Mode Toggle button using HTML, CSS and JavaScript
Here’s a simple way to create a toggle button to switch between light mode and dark mode using HTML, CSS and JavaScript function. In the above CSS code block, we’ve created the default light mode background for the body. We’ve also created another dark-mode class which will be activated dynamically using the JavaScript function. In…
-
JavaScript Promises using Resolve and Reject
JavaScript has a special class called Promise. In order to create a promise, you’ll have to create an instance of the promise class. The promise constructor needs only a single argument which is a function (though you can add two arguments as well). The promise needs to be created with the function. The function is…
-
How to create reusable Header and Footer using JavaScript?
There are a few different ways to create reusable header or footer in a website using JavaScript so that you don’t have to repeat the code. Let’s explore : Method 1 (using template tag) I’m using an HTML template tag to hold content first. Content inside this tag is hidden by default. You have to…
-
Asynchronous JavaScript, AJAX, APIs and JSON : An Intro
In order to understand what Asynchronous JavaScript is, we need to first know what synchronous JavaScript means. Every JS function or code runs in a certain rule of sequence. For example, in order to execute a multi-line code, a first set of instructions is executed just to go to the next step and the next,…
-
Whether a number is odd or even – JavaScript
Question How to find out whether a number is odd or even using JavaScript code? Solution 1 Solution 2 Note: Here I’ve used the Bitwise AND rule. Refer JavaScript Bitwise AND documentation to know why this works. In the above code, n & 1 returns odd and everything else returns even numbers as per the…