true + false = 1!? JavaScript logic is WILD 😵💫🔥
Wait… true + false gives you 1 in JavaScript? 🤔
Here’s why it happens:
✔️ true ➝ 1
✔️ false ➝ 0
➡️ So true + false = 1 + 0 = 1
It’s not magic — it’s type coercion!
JavaScript loves to mess with your brain sometimes 😵💫
💡 If you enjoy weird JavaScript facts and coding tricks, hit subscribe for more fun shorts every week!
Видео true + false = 1!? JavaScript logic is WILD 😵💫🔥 канала Web Lead Dev Tips
Here’s why it happens:
✔️ true ➝ 1
✔️ false ➝ 0
➡️ So true + false = 1 + 0 = 1
It’s not magic — it’s type coercion!
JavaScript loves to mess with your brain sometimes 😵💫
💡 If you enjoy weird JavaScript facts and coding tricks, hit subscribe for more fun shorts every week!
Видео true + false = 1!? JavaScript logic is WILD 😵💫🔥 канала Web Lead Dev Tips
Комментарии отсутствуют
Информация о видео
6 июля 2025 г. 17:32:36
00:00:32
Другие видео канала