JSFiddle - React, Tailwind, and code Playground
by Alexander
JavaScript
// # What the... JavaScript - By Kyle Simpson
// - JS has things that make code inconsistent, incoherent and unreasonable
// - ...however...most WTF moments in JS are caused by lack of understanding
// ## WTF Examples
//### Coercion
//`1<2<3 //true` but `3>1>1 //false` --> this is due to coercion
//### Finally
function () {
try {
return 2;
}
finally {
return 3;
}
}
foo(); // 3 <-- WTF!!! and where is the 2??
/*
## Non WTF things coming in ES6
- Generators: you can pause and resume functions externally. `function *foo () {`
- Object Destruction
- Default Values
## WTF things coming in ES6
- Classes!!
*/