[[]].map(Array)
// ['10','10','10','10','10'].map(parseInt)
// [10, NaN, 2, 3, 4]
https://stackoverflow.com/q/14528397/1248177
function a() {
return {
"name": "foo"
}
}
function b()
{
return
{
"name": "foo"
}
}
3.toString() => ';' attendu
(3).toString() => "3"
3..toString() => "3"
>>> x = new Array(3)
[undefined, undefined, undefined]
>>> y = [undefined, undefined, undefined]
[undefined, undefined, undefined]
>>> x.constructor == y.constructor // ou ===
true
>>> x.map(() => 0)
[undefined, undefined, undefined]
>>> y.map(() => 0)
[0, 0, 0]
https://stackoverflow.com/q/5501581/1248177
null > 0 false
null == 0 false
null >= 0 true
'2' + '2' - '2' = 20
- '2' + '2' + '2' = -222
'2' - '2' + '2' = 02
output of ([true, true] + [1]).length
?
expected 3 (true,true,1]).length got 10
because "true,true1".length ...
var str = function(){/* Is it madness? */}.toString().slice(14,-4)