Thomson Reuters interview question

JavaScript basic question