JavaScript solutions to coding challanges