How to add dark mode using javascript

We’re going to be adding dark mode to a simple website using javascript and the localStorage property of the window object. The localStorage property will be used in order to maintain dark mode even after the page is refreshed. Note: Before we start, I’d like to say that the best way to gain a lot from this tutorial is by following along, especially if you are a beginner.. (though it’s not necessary, it’s better if you could)....

June 28, 2022 · 4 min · Jima Victor

How to download and install Node.js and NPM on windows 10

This post is going to focus on how to install node.js on your windows 10 operating system and i am also going to show you how to setup your path environment variables for node.js so you can be able to use node.js from any directory in your computer system. STEP 1: Download Node.js First of all, you need to download and install node.js from the official website On the website, the Long Term Support(LTS) version (which also includes npm) will be selected by default but if by any means it is not, please make sure it is selected because that is the version we want and it is also recommended for most users....

April 15, 2022 · 3 min · Jima Victor

How to create a three state toggle switch using HTML, CSS and JavaScript

In this tutorial, I am going to be showing you how to build a toggle switch with three states. Normally a toggle switch has just two states - ON and OFF. That’s why it’s called a toggle switch. But I was on the Frontend Mentor website the other day, scouring through for some frontend dev challenges to work on while I came across the calculator challenge on their website. Working on this challenge required building a toggle switch with three states....

March 9, 2022 · 5 min · Jima Victor

HtmlCollection vs NodeList in Javascript

At some point in your journey as a developer, you might have come across this error. If you haven’t come across this error, maybe one day you will. The above error occurs as a result of trying to use the forEach array method on an htmlCollection. What is an htmlCollection Well, an htmlCollection is a live and ordered list of nodes that represents a collection of HTML elements extracted from the DOM....

January 10, 2022 · 3 min · Jima Victor

How to build a simple BMI calculator using html and javascript

This tutorial is going to cover how you can build your very own BMI calculator using simple html and javascript. If you are interested in python too, you can also check out how to build a BMI calculator in python What is a BMI calculator? BMI stands for Body Mass Index. A BMI calculator is just a simple calculator that can be used to measure the ratio of a person’s weight to the square of a person’s height....

December 28, 2021 · 4 min · Jima Victor