Created
October 8, 2019 11:25
-
-
Save PetterRuud/e56e90b3ed51743b16885df0251e2c66 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[] + {} // "[object Object]" | |
{} + [] // 0 | |
var x = true, y = "42"; | |
x == y; // false | |
y = 'true' | |
x == y // false | |
var a = { b: 42 }; | |
var b = { b: 42 }; | |
a == b; // false. Checks if a and b point to the same object. | |
a < b; // false | |
a > b; // false | |
a <= b; // true | |
a >= b; // true | |
var a = 42 | |
//++a++ // ?? | |
// make sure you are in the global scope | |
name = function (me) { | |
console.log(`I am ${me}! :)`) | |
} | |
name('Parama'); // TypeError: name is not a function | |
undefined == null // true | |
null + 1 // 1 | |
undefined + 1 // NaN | |
var { a: X, a: Y, a: [ Z ] } = { a: [ 1 ] } ; | |
X.push( 2 ); | |
Y[0] = 10; | |
X; // [10,2] Woah!! | |
Y; // [10,2] What now? | |
Z; // 1 | |
for(let i=(setTimeout(()=>console.log(i)),0); i<2; i++) { | |
i++; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment