Rangle.io interview question

JavaScript question, general questions