Javascript Interview Code Questions