created by Brian LeRoux & Andrew Lunny. sparodically uncurated by David Trejo.

2015 04 23 screwy negative array index

  var arr = [1, 2, 3, 4, 5, 6, 7, 8];
  arr[-1] = "yo wazzzup";
  console.log(arr.length); // > 8
  console.log(arr[arr.indexOf(99)]); // log's > "yo wazzzup"
Fork me on GitHub