Slide 11
Slide 11 text
https://charlieharvey.org.uk/page/javascript_the_weird_parts
JavaScript: The Friend of Your Enemy!
x = [0]
x == x -> true
x == !x -> true
#wtf
true+true===2 -> true
true-true===0 -> true
true===1 -> false
#wtf
(!+[]+[]+![]).length -> 9
#wtf
[]+[] -> ""
[]+{} -> "[object Object]“
{}+[] -> 0
#wtf
0.1+0.2==0.3 -> false
Math.max()>Math.min() -> false
#wtf