Drop interview question

Basic Javascript/algorithms