javascript

javascript

4 JavaScript program to check if the first character of a string is in lower case or not

How to check if the first character of a string is in lower case or not in JavaScript. We will learn 4 different ways to check it in JavaScript.

Read
javascript

How to check if an object is null or undefined in JavaScript

Learn how to check if an object is null or undefined in JavaScript. We can do it by using equality operator ==, strict equality operator ===, and by using typeof.

Read
javascript

4 ways in JavaScript to check if a string starts with a number

Learn how to check if a string starts with a number in JavaScript in 4 different ways. We will use charCodeAt, charAt, isNaN function and Regex to check it.

Read
javascript

3 ways to get a random value from an array in JavaScript

JavaScript program to get a random value from an array. Learn how to do that in three different ways - by using Math.random(), ~~ operator, and by using lodash.

Read
javascript

JavaScript array values() function

JavaScript array values() function explanation with examples. The values() function returns a new array iterator object that can be used to iterate over the array content.

Read
javascript

6 different ways in JavaScript to print the content of an array

Learn how to print the content of an array in JavaScript in 6 different ways. We will learn how to use a for loop, while loop, do-while loop, forEach, for-of and for-in to print the array content in JavaScript.

Read
javascript

How to remove all zeros from a number string in JavaScript

JavaScript program to remove all zeros from a number string. This post will show you three different ways to do that- by traversing the string, by using replace() and by using parseInt or parseFloat methods.

Read
javascript

3 ways in JavaScript to remove all hyphens from a string

JavaScript program to remove all hyphens from a string. This post will show you three different ways to remove all hyphens from a given string in JavaScript

Read
javascript

JavaScript string codePointAt method explanation with example

Learn how to use codePointAt method of JavaScript string in this post. codePointAt is an inbuilt method of JavaScript string and this method can be used to get the unicode code point value at a given index.

Read
javascript

JavaScript Array isArray method explanation with examples

Javascript Array.isArray() method explanation with examples. The isArray method is used to check if an object is an array or not. Learn how to use this method with examples.

Read