Reddit Cone in Javascript