Xoriant interview question

javascript basics