Skip to content

Instantly share code, notes, and snippets.

@pedrodelgallego
Created August 4, 2010 21:27
Show Gist options
  • Select an option

  • Save pedrodelgallego/508834 to your computer and use it in GitHub Desktop.

Select an option

Save pedrodelgallego/508834 to your computer and use it in GitHub Desktop.
Array.prototype[1] = 1;
var x = [0];
x.length = 2;
var arr = x.concat();
//CHECK#1
if (arr[0] !== 0) {
$ERROR('#1: Array.prototype[1] = 1; x = [0]; x.length = 2; var arr = x.concat(); arr[0] === 0. Actual: ' + (arr[0]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment