Cracking the Coding Interview questions answered in JavaScript