HCLTech interview question

Some of the logical questions regarding JavaScript.