1. Style Console Log
If you want to customize the variable in comparison to others you need to use %c and console.log() before it. And add CSS properties as you want in it.
2. Use Shorthand Operators
3. Elective Chaining
Chaining ?. is used to check properties before ?. if it's null or undefined then it returns undefined otherwise its returns the value.
4. Use Generator Function
This is a function that similar to common functions the only difference between them is Generator function stops the execution on a particular line when you want and continue when you want.
5. Use in Keyword
in keyword is used to check the properties are available in an object or not. After using this keyword you can get the true or false value its depend on the value that available in an object or not.
Top comments (5)
can you please remove the #showdev tag from your post? that tag is only used For showing off projects and launching products.
Thanks for explanation.
Worth mentioning that the styled
consoleworks on the browser, but not on Node (is not that useful either).
Knowledge tag or learn might be good