for-coder
434 subscribers
103 photos
55 videos
25 files
139 links
@FORCODERR

@firaflash ๐Ÿ‘จโ€๐Ÿ’ป
Download Telegram
What is the output of the above code
Anonymous Quiz
43%
10
15%
Reference error
32%
20
10%
Undefined
This media is not supported in your browser
VIEW IN TELEGRAM
Been off latelyโ€ฆ had to train my finger to hit Tab professionally ๐Ÿ‹๏ธโ€โ™‚๏ธโŒจ๏ธ
#coding_meme@forcoder #codingmeme
 
function yapp(){
console.log(typeof null );
}

yapp();
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");
Please open Telegram to view this post
VIEW IN TELEGRAM
cool guy ๐Ÿ˜Ž at a cool place ๐Ÿ“๐Ÿ“ธ