Computer Science problems practice in javascript