3 ms·
If we're being nitpicky about type checking... function f() { return Math.random() < 0.5; } f.toString = function () { return 'function toArray() { [na
by pwdisswordfish 10y ago
If we're being nitpicky about type checking...
function f() { return Math.random() < 0.5; }
f.toString = function () { return 'function toArray() { [native code] }' }
Array.isArray = f;
What, use Function.prototype.toString instead? What if someone tampered with that too?