Computer Science Javascript Interview Coding