Sometimes, we want to set an img element’s src attribute with a JavaScript function’s return…
Month: April 2022
Sometimes, we want to clone a JavaScript class instance?. In this article, we’ll look at…
Sometimes, we want to return a date in UTC with Moment.js. In this article, we’ll…
Sometimes, we want to add the JavaScript equivalent of Python’s rsplit method. In this article,…
Sometimes, we want to attach an click event handler to all links with JavaScript. In…
Sometimes, we want to create a 2D array of zeroes in JavaScript. In this article,…
Sometimes, we want to detect whether a string is in URL format using JavaScript. In…
Sometimes, we want to check the format of date with moment.js and JavaScript. In this…
Sometimes, we want to use a regex to get first word after slash in URL…
Sometimes, we want to cast a string to an array with JavaScript. In this article,…