Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Can you solve it? The Greplin programming challenge. Parent comment
var nums = "3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99".split(", ");
for(var i = 0;i< nums.length;i++) { nums[i] = parseInt(nums[i],10); }
Instead of just editing the numbers so that it was an array right away. Happens if you code before you think :-)
There are no comments on this comment yet.
var nums = "3, 4, 9, 14, 15, 19, 28, 37, 47, 50, 54, 56, 59, 61, 70, 73, 78, 81, 92, 95, 97, 99".split(", ");
for(var i = 0;i< nums.length;i++) { nums[i] = parseInt(nums[i],10); }
Instead of just editing the numbers so that it was an array right away. Happens if you code before you think :-)