Let's jump to the tips!
* Shorten an array
You can set the length property to shorten an array.
* Short-circuits conditionals
If you have to execute a function only if condition is true, you can use short-circuit.
* Show specific
console.table() lists all elements in each row. You can use the optional “columns” parameter to select a subset of columns to display:
* Remove duplicate elements from an array:
* Convert a string to number:
* Convert a number to string:
* Numeric separators
To improve readability for numbers, you can use underscores as separators:
You can find more HTML/CSS/JS Tips here: github.com/MarkoDenic/awesome-html-css-js-tips
If you liked this article, be sure to ❤️ it.