News for hackers. Stuff that matters.
Re:Learn JS - Free Interactive JavaScript Tutorial by anon525 on Thursday August 29, 2013 @11:03AM (#6296171)
The third tutorial "Manipulating Arrays" is broken. myQueue.unshift(); prints 3, no matter what variable is inserted prior.

input:

  var myQueue = [];
  myQueue.push(1);
  myQueue.push(2);
  myQueue.push(3);

  console.log(myQueue.unshift());
  console.log(myQueue.unshift());
  console.log(myQueue.unshift());
output:

  3
  3
  3
Re:Learn JS - Free Interactive JavaScript Tutorial by ronreiter on Sunday September 08, 2013 @02:03AM (#6347982)
thanks, fixed!