Ask HN: Has anyone else been having issues with Cloudflare captchas this week?
3 pointsby Mateon14 comments
function do_something() {
if (true) {
var x = 42;
let y = 42;
}
console.log(x); // 42
console.log(y); // Reference error: y is not defined
}
It's extremely useful in for loops: for (var i = 0; i < 5; i++) {
setTimeout(function () { console.log(i); }); // => 5, 5, 5, 5, 5
}
for (let i = 0; i < 5; i++) {
setTimeout(function () { console.log(i); }); // => 0, 1, 2, 3, 4
} 1/10 m -> 0.1 / m
1|10 m -> 0.1 m
27 ^ 2/3 -> 243
27 ^ 2|3 -> 9
You get the gist of it - a division operator with insane precedence.