MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programminghumor/comments/1wpwta7/tissues/pc5dnid/
r/programminghumor • u/ExpensiveCoat8912 • Sep 25 '26
31 comments sorted by
View all comments
Show parent comment
4
OP is referring to JavaScript. It has all 4 states.
Undefined is exactly it says it is. The thing you are accessing is literally not defined.
var myobj;
3 u/golfstreamer Sep 26 '26 Ah thank you for your help. 1 u/Yoshalina Sep 26 '26 it is possible to intentionally assign it with the undefined literal though, too. 2 u/TylerBreau Sep 26 '26 Before ECMAScript 5 you could also assign undefined. 1 u/Yoshalina Sep 26 '26 this is still possible. let meow = undefined; 2 u/TylerBreau Sep 26 '26 No, I mean undefined = 'meow'; 2 u/Yoshalina Sep 26 '26 Oh. That is really fucking cursed.
3
Ah thank you for your help.
1 u/Yoshalina Sep 26 '26 it is possible to intentionally assign it with the undefined literal though, too. 2 u/TylerBreau Sep 26 '26 Before ECMAScript 5 you could also assign undefined. 1 u/Yoshalina Sep 26 '26 this is still possible. let meow = undefined; 2 u/TylerBreau Sep 26 '26 No, I mean undefined = 'meow'; 2 u/Yoshalina Sep 26 '26 Oh. That is really fucking cursed.
1
it is possible to intentionally assign it with the undefined literal though, too.
undefined
2 u/TylerBreau Sep 26 '26 Before ECMAScript 5 you could also assign undefined. 1 u/Yoshalina Sep 26 '26 this is still possible. let meow = undefined; 2 u/TylerBreau Sep 26 '26 No, I mean undefined = 'meow'; 2 u/Yoshalina Sep 26 '26 Oh. That is really fucking cursed.
2
Before ECMAScript 5 you could also assign undefined.
1 u/Yoshalina Sep 26 '26 this is still possible. let meow = undefined; 2 u/TylerBreau Sep 26 '26 No, I mean undefined = 'meow'; 2 u/Yoshalina Sep 26 '26 Oh. That is really fucking cursed.
this is still possible. let meow = undefined;
let meow = undefined;
2 u/TylerBreau Sep 26 '26 No, I mean undefined = 'meow'; 2 u/Yoshalina Sep 26 '26 Oh. That is really fucking cursed.
No, I mean undefined = 'meow';
undefined = 'meow';
2 u/Yoshalina Sep 26 '26 Oh. That is really fucking cursed.
Oh. That is really fucking cursed.
View all comments
Show parent comment
4
u/TylerBreau Sep 26 '26
OP is referring to JavaScript. It has all 4 states.
Undefined is exactly it says it is. The thing you are accessing is literally not defined.
var myobj;