
JavaScript – Detect if a string contains any space
In this post, we will see how to detect any whitespace in a string. To detect if a string has any space in it, we can use the regex test()…
Read more
Check if String starts with a space in JavaScript
In this post, we will see how to check whether the first character in a string is a space or not using Javascript. To check if a string starts with…
Read more
Convert and Save HTML elements as Image using JavaScript
In this post, we will learn how to save an HTML element as an image from a webpage. To convert or save any HTML element or entire webpage as an…
Read more
date.getDate() is not a function error in JavaScript – Fixed
In this short post, we will see why we get and how to solve the “date.getDate() is not a function” Error in Javascript. The error “date.getDate() is not a function”…
Read more
Convert HTMLCollection into array in JavaScript
In this post, we will see how to convert HTMLCollection into an array in JavaScript. The HTMLCollection is a array-like collections (list) of HTML elements (nodes) extracted from a document….
Read more
What is memoization and how to cache function results in JavaScript
In this post, we will learn about Javascript memoization and how to write a memoize function in Javascript. What is memoization in JavaScript? Memoization is an optimization technique used to…
Read more
Javascript nullish coalescing (double question mark) operator
In this article, we will learn about the double question mark operator i.e the nullish coalescing operator in Javascript. While working or reviewing codes on Github, we sometimes come across…
Read more
Javascript – Convert array to String (with and without commas)
In this article, we will learn how to convert an array into a string with and without commas. In Javascript, we can convert an array into a string using the…
Read more
Add Multiple Classes to HTML elements using JavaScript
In this article, we will learn how to add and remove multiple classes from a DOM element using Javascript. In Javascript, we can use the classList property to add a…
Read more