The 7 Things I Know About Cyber Security After 25 Years | April 2024
OMG JavaScript
1.
2. About duck typing in dynamic
languages:
“My god how you can write a real program
when you just assigning random crap to
another crap and expecting it to work”
– John
Carmack, founder of id Software, developer of
popular game titles like Wolfenstein , Doom, Quake
and Rage, well-known open source
advocate, millionaire.
8. console.log( 3.toString() )
console.log( 3..toString() )
→ SyntaxError: identifier starts immediately after numeric literal
→ "3"
var a = new Number;
console.log(a == 0)
var a = new String;
console.log(a == "")
var a = new Object;
console.log(a == {})
var a = new Array;
console.log(a == [])
→ true
→ true
→ false
→ false
9. var a = {};
console.log( a == {} );
var a = [];
console.log( a == [] );
→ false
→ false
console.log( (!+[]+[]+![]) );
→ "truefalse"
console.log(
(![]+[])[+[]]+(![]+[])[+!+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+
[])[!+[]+!+[]] )
→ "fail"