for-coder
432 subscribers
102 photos
54 videos
23 files
138 links
@FORCODERR

@firaflash πŸ‘¨β€πŸ’»
Download Telegram
What is the output of the above code
Anonymous Quiz
21%
undefined
38%
null
17%
error
25%
object
for-coder
What is the output of the above code
Please open Telegram to view this post
VIEW IN TELEGRAM
🚨 JAVASCRIPT HAS A REAL BUG! 🚨


Open your console and type:
typeof null


You'll get:
'object'


That's wrongβ€”null is not an object!

πŸ” How did this happen?

When JavaScript was first implemented, values were stored in a tagged format, where the lower bits determined the type:
- Objects had a type tag of 0.
- null was stored as 0 in memory.

Since null had 0 in its type tag, typeof mistakenly classified it as an "object".

πŸ”§ Why isn't it fixed?
One word: Backward compatibility.
Fixing it would break too many apps, so it's here to stay!

πŸ’¬ Share this with JavaScript haters new (Lovers)... Lmao

#JavaScript #Bug #Programming
Two different users of cursor😭
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Good night I gotta use VPN ✈️ from now on
Good evening β˜•οΈβ˜•οΈ
Does anyone know a coffee shop or workspace with decent WiFi? I'm on an unlimited 5G plan, but the network's acting like it's powered by a potatoβ€”87kbps right now.
Please open Telegram to view this post
VIEW IN TELEGRAM
let x;  
console.log(x ?? "default");
What is the output of the above code?
Anonymous Quiz
15%
A) undefined
44%
B) β€œdefault”
31%
C) null
10%
D) ReferenceError
Please open Telegram to view this post
VIEW IN TELEGRAM
cool guy 😎 at a cool place πŸ“πŸ“Έ
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM
Please open Telegram to view this post
VIEW IN TELEGRAM