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

1/ Here’s a list of conversational frameworks I’ve picked up that have been helpful.

Please add your own.

2/ The Magic Question: "What would need to be true for you


3/ On evaluating where someone’s head is at regarding a topic they are being wishy-washy about or delaying.

“Gun to the head—what would you decide now?”

“Fast forward 6 months after your sabbatical--how would you decide: what criteria is most important to you?”

4/ Other Q’s re: decisions:

“Putting aside a list of pros/cons, what’s the *one* reason you’re doing this?” “Why is that the most important reason?”

“What’s end-game here?”

“What does success look like in a world where you pick that path?”

5/ When listening, after empathizing, and wanting to help them make their own decisions without imposing your world view:

“What would the best version of yourself do”?