javascript

javascript

JavaScript replace multiple characters using single replace call

JavaScript program to replace multiple characters of a string with one single replace call. This post will show you different examples with the replace() method and replaceAll() method with regex.

Read
javascript

JavaScript program to find if a number is a Magic number or not

JavaScript program to check if a number is a magic number or not. This post will show you how to check for a magic number by using while loops and with HTML.

Read
javascript

How to convert an image to Base64 in JavaScript

JavaScript program to convert an image to Base64. We will learn how to find the Base64 of a local image and a remote image with HTML example programs.

Read
javascript

JavaScript program to check if a number is Moran

JavaScript program to check for Moran number. Learn what is a Moran number and how to check if a number is Moran or not in JavaScript with example.

Read
javascript

5 different JavaScript programs to find the average of array values

JavaScript program to find the average of array numbers. We will learn how to find it by using a for loop, while loop, for..of loop, forEach and with reduce with examples for each.

Read
javascript

Leap year program in JavaScript with example

JavaScript program to check if a year is a leap year or not. We will learn how to check for leap year by using a separate function and with HTML and JavaScript.

Read
javascript

How to print Floyd's triangle in JavaScript in 3 ways

JavaScript program to print Floyd's triangle. We will learn three different ways to print the triangle, by using for loops, while loops and with a separate function.

Read
javascript

3 ways in JavaScript to print the Fibonacci series

JavaScript program to print the Fibonacci series in three different ways. This program will show you how to use for loop, while loop and recursive function to print the Fibonacci series.

Read
javascript

JavaScript program to convert a seconds value to HH:mm:ss

JavaScript program to convert a seconds value to hour, minute and seconds or HH:mm:ss format. We will also learn how to convert it to other formats.

Read
javascript

JavaScript program to calculate BMI with user input values

JavaScript program to calculate BMI with user input values. It will take the weight and height as inputs from the user, calculate the BMI and print the output.

Read