Hackerrank Javascript Practice Solutions