JavaScript tips and tricks💡

A thread🧵

Never declare variables inside a for loop!
https://t.co/0NrXPBEeyL
Copy to clipboard
https://t.co/KZPc9s9M4I
Use "splice" instead of "delete".
https://t.co/4qc9R4Eeoj
Array of unique values.
https://t.co/2F2u3wZiOj
Avoid global variables.
https://t.co/bRAoq3Vx4F
Short circuit conditionals using AND operator.
https://t.co/DHNjQeXXEv
Quick Rounding using OR operator.
https://t.co/rg1TQ37bSQ
"toLocaleString" in JavaScript
https://t.co/n5verHAzjh
Comparing three numbers and how it works!
https://t.co/mgtL3wGSFp
Dynamic property in objects.
https://t.co/LkUWDkxwnJ
NaN🤯
https://t.co/reIYvi7FD4
How to not push node_modules to git!
https://t.co/awaQLKUVZw
Testing in JavaScript.
https://t.co/KUxSZTCHHJ

You May Also Like