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

First thread of the year because I have time during MCO. As requested, a thread on the gods and spirits of Malay folk religion. Some are indigenous, some are of Indian origin, some have Islamic


Before I begin, it might be worth explaining the Malay conception of the spirit world. At its deepest level, Malay religious belief is animist. All living beings and even certain objects are said to have a soul. Natural phenomena are either controlled by or personified as spirits

Although these beings had to be respected, not all of them were powerful enough to be considered gods. Offerings would be made to the spirits that had greater influence on human life. Spells and incantations would invoke their


Two known examples of such elemental spirits that had god-like status are Raja Angin (king of the wind) and Mambang Tali Arus (spirit of river currents). There were undoubtedly many more which have been lost to time

Contact with ancient India brought the influence of Hinduism and Buddhism to SEA. What we now call Hinduism similarly developed in India out of native animism and the more formal Vedic tradition. This can be seen in the multitude of sacred animals and location-specific Hindu gods