Digital Aptech interview question

javascript theory and program output questions