How to remove class name from element using JavaScript
Tags: javascriptDo you know you can remove a class name from an element with the click of a button in JavaScript? ...November 11, 2023Continue Reading.How to sort a string in reverse order in JavaScript
Tags: javascriptYou can use the .sort() and .reverse() methods in JavaScript to sort a string in reverse order. ...December 3, 2023Continue Reading.Convert Text to Speech in JavaScript using Web Speech API
Tags: javascript | browserThe SpeechSynthesis interface of Web Speech API allows JS developers to convert text to speech. Example here. ...January 8, 2024Continue Reading.How to sort a nested array in reverse order JavaScript
Tags: javascriptHere I am using a combination of "four" JS built-in methods to sort a nested array in reverse ...December 4, 2023Continue Reading.How to autoplay embedded YouTube videos
Tags: javascript | googleThere are two simple methods that you can use to autoplay embedded YouTube videos in 2023. ...November 26, 2023Continue Reading.Using JS .map() to get only numbers from an array of values
Tags: javascriptUsing JS map() function you can quickly and efficiently extract only numbers from an array of values ...November 12, 2023Continue Reading.JavaScript RegExp \d Metacharacter - Extract only numbers from a string
Tags: javascriptHow to use regexp \d metachacter in JavaScript to extract only numbers from a string? Its simple. ...December 6, 2023Continue Reading.Check if the clicked element is a DIV or not using JavaScript
Tags: javascriptOne of simplest ways to check if the clicked element is a DIV or not is by using the tagName property. Here is an example. ...October 16, 2023Continue Reading.Find the (x, y) position of an HTML element using JavaScript
Tags: javascriptYou can use the getBoundingClientRect() method in JavaScript to find (or get) the position (x and y coordinates) of an HTML element. ...November 24, 2023Continue Reading.Quick Tip: How to get the first and last element in an Array using JavaScript
Tags: javascriptYou can use the find() and findLast() methods in JavaScript to get the first and last element in an array. ...November 29, 2023Continue Reading.