Each programming language has its own tricks up in its sleeve. Many of them are known to developers, and yet some of them are pretty hackish. In this article, I will show you a couple of tricks I find useful. Some of them I've used in practice and others are the new way of solving old problems. Enjoy! https://devinduct.com/blogpost/26/8-useful-javascript-tricks
Ever worked on a grid where the raw data needs to be recreated with the possibility that columns length might mismatch for each row? Well, I have! For ensuring the length equality between the mismatching rows you can use Array.fill method.
let array = Array(5).fill(''); console.log(array); // outputs (5) ["", "", "", "", ""]