Hackerearth Javascript Coding Questions