BP3 interview question

Javascript coding question