Skip to content

Instantly share code, notes, and snippets.

@bga
Created October 7, 2010 14:58
Show Gist options
  • Save bga/615227 to your computer and use it in GitHub Desktop.
Save bga/615227 to your computer and use it in GitHub Desktop.
$jb._isFunction([].map) &&
(function(){
var n = 0
, isFail = false
, a = [1, 2, 3]
, b = a.map(
function(v, i, vs)
{
n |= 1 << i;
if(vs != a)
isFail = true;
return 2*v;
}
)
;
return !isFail && n == 7 && b.length == 3 && b[0] == 2 && b[1] == 4 && b[2] == 6;
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment