Javascript Loops

There are several ways to do iterations in javascript through loops. This post explains the different looping methods that exist in Javascript. You can execute all the codes described in this post from this site: https://js.do/ It allows you to execute Javascript code directly online without installing anything! 🙂 Javascript For loop Output : Pokemon… Continue reading Javascript Loops

Javascript sleep function

How to make a function sleep for a certain period of time in Javascript? Sleep() function With the help of the Sleep() function, we can create a function to interrupt the execution of the program for a certain period of time. The problem is that in Javascript there are no sleep() functions like in other… Continue reading Javascript sleep function

How to replace all occurrences of a string in JavaScript

How to replace all occurrences of a string in JavaScript : The replace() method in Javascript searches within a string for a specified value or regular expression and returns a new string in which the specified values are replaced. However, if a string contains repeated words, the replace() method changes only the first occurrence of a… Continue reading How to replace all occurrences of a string in JavaScript