What will be the console output, when the below JavaScript code is executed? 

let myMessage="Hello World!"; 
let myMessage="Hello JavaScript!"; 
console.log(myMessage)

It will throw a SyntaxError

"Hello World!" will be printed in the console

It will print undefined

"Hello JavaScript!" will be printed in the console.

Verified Answer
Correct Option - a

To get all Infosys Certified JavaScript Professional Exam questions Join Telegram Group https://rebrand.ly/lex-telegram-236dee

Telegram