If the array contains nested arrays we can make it as flat using infinity in flat
Author: Joseph Ronald
Create a Self-calling Function
this kind of function is mainly used to execute automatically when we create it.
Showing elements of an array without creating loop
The Spread Operator expands an array into its elements. It can also be used for object literals. If we want to show a list of favorite foods without creating a loop function. Use a spread operator like this:
Use logical AND/OR for conditions
Instead of using an if-condition, you can use a logical AND/OR. This can be used within a function for executing commands.
Calculate the performance of a function
If you want to check how long a function runs you can use this approach in your program.
Shuffle an array
Sometimes you want to randomize the values within an array. To achieve this you can use the Array.sort function with a random compareFunction.
Shorten the console log
There is a easy script uses bind to shorten the console log to speed up the development process.This can be done with every function
CSS Variables
A CSS preprocessor is the possibility of using variables to create re-usable values. SASS are very useful for front-end web development, they aren’t required for using variables, as this can be done in native CSS.
CSS Animations
We can natively animate HTML elements in pure CSS. which means we can add from and to colour to animate colour.
Curve Text Around a Floating Image
shape-outside is a CSS property that allows geometric shapes to be set, in order to define an area for text to flow around.