Basic Javascript Coding Interview Problems