What will be printed out as a result of the following code execution?

var a1 = "wrong";
function a() { return "1st"; };
function a(val) { this.a1 = "right"; return "2nd"; }
alert(new a().a1);

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes