JavaScript Search API
You can use JavaScript to search for a particular word, item or phrase in API. This can be done in a step-step process as follows: 2. Next, you need to…
You can use JavaScript to search for a particular word, item or phrase in API. This can be done in a step-step process as follows: 2. Next, you need to…
The Bootstrap alternatives you should try in 2023 are numerous and easy to get started with. Bootstrap is a popular framework for designing websites and applications, but it may not…
The best JavaScript animation libraries are the ones that are powerful enough to leave lasting impressions on the user. But knowing how and when to use animations in a webpage…
Question: count down days, hours, minutes and seconds to a set date in JavaScript JavaScript provides several built-in functions and objects for working with dates and times. Here are some…
Question: write a JavaScript Program That Prints Out Odd Numbers From 1 – 10 Odd numbers are integers that cannot be divided evenly by 2. In other words, if you…
Using one of the powerful features of JavaScript, we can write a program that generates a random background color every time we refresh the page. When we refresh our page,…
Moment.js has been successfully used in millions of projects with over 12 million downloads per week. Here’s a curated moment.js cheatsheet to quickly use in your project. First, Install Dependencies…
A string in Javascript represents a sequence of characters. Strings are useful for holding data that can be represented in textual forms. Some of the most-used operations on strings are…
Using JavaScript, we can shorten the length of our string and just replace the rest with three dots. Explanation We’re achieving this using the substring() and concat() method. The substring()…
Solve the fizzbuzz hackerrank challenge question: Given a number n, for each integer i in the range from 1 to n inclusive, print out one value per line as follows:…
In this tutorial, we are going to use the Fetch API to fetch all public holidays in the United States. We’ve have written extensively on the Fetch API here. So,…
Text to speech (also known as tts or speech synthesis) is an offshoot of the Web Speech API which provides distinct areas of functionality, including speech recognition. Speech Synthesis Speech…
Dynamically Populate Select Options in React JS could be a real time-saver. When working with software applications built with libraries like React, there are times when you need to dynamically…
We can easily get the distinct values in our JavaScript array by using the spread operator. The spread operator makes it for us to iterate over an array and return…
In Javascript, dates are objects and are inbuilt. There are also methods that can be used to access these date objects, especially when you want to implement these methods in…
You’ve probably heard it a lot: Work smart and not hard. That advice couldn’t be more legit, especially when it comes to programming. Especially when it comes to Javascript. Beyond…
Inheritance is an important concept in Object Oriented Programming. Inheritance is the process whereby one class, also called the sub-class, acquires the properties and methods of another class, also known…
Object Oriented Programming (OOP) is a way of writing code such that you can create different objects (also called “instances”) from a common blueprint. Each created instance has properties that…
Introduced in ES6 as a major update to the Object Oriented Programming concept in Javascript, Classes are templates for creating objects. Classes can also referred to as the “syntactic sugar”…
In JavaScript, null, undefined, and not defined are three distinct concepts that refer to different values or states. In this article we shall look at null, undefined and not defined…
Callback functions, Promises, and Async Await are concepts fundamentally used by JavaScript to handle deferred operations. Sometimes an operation could be synchronous (blocking) or asynchronous (non-blocking). Let us take a…
The rest parameter is an ES6 syntax that is used to represent an indefinite number of elements as an array. See arrays in Java Example It can also be used…
The XMLHttpRequest is a Javascript object that is used to interact with web servers. The XMLHttpRequest() is a Javascript function that makes it possible for developers to fetch XML data…
If you are writing a web application, there is every possibility that at some point you will have to work with external data. This can be data from your own…
A switch statement gives an expression a value to evaluate and several different statements to execute based on the value of the expression. It is a useful alternative to the…
Web browsers generally have consoles, which are interactive command lines where you can print text and test pieces of code. This is where, for the most part, you’ll be debugging…
Pure Functions A pure function in Javascript is one that given the same input will always return the same output and does not have any observable side effect. This means…
Unlike logical operators which connect two or more expressions, relational operators test and establish some type of relation between two or more operands. There are six (6) relational operators, which…
Template literals allow for embedded expressions and help to solve the complex concatenation problem. They are enclosed by a back-tick character (the button just below the escape key on your…
A function is a group of reusable code that can be called anywhere in your program. Functions eliminate the need of writing the same code again and again. Functions also…
Arrow functions, also called “fat arrows” were introduced with ES6 as a new syntax for writing Javascript functions. By utilising a token (=>) that looks like a fat arrow, they…
The Array filter method is used to check against a given condition.
A recursive function is one which defines a problem in terms of itself. A recursive function calls itself directly or indirectly until it is stopped. If it is not stopped,…
Object oriented programming is a way of writing code such that different objects (instances) are created from a single object (blueprint). Each created instance usually have properties that are not…
Also known as ECMAScript 6, ECMAScript 2015 or Javascript 6, ES6 is a version of Javascript that was introduced in 2105. ECMAScript (ES) is a scripting language specification standardised by…
A recursive function is one which defines a problem in terms of itself. A recursive function calls itself directly or indirectly until it is stopped. If it is not stopped,…
Var Declaration Before the introduction of ES6 in 2015, var was the go-to way to declare variables in Javascript. Example: But because variable declarations are processed before any code is…