Consider following code snippet:

var i=5;
alert(++i);
What message will display the alert box?
Explanation

var i=5; 
alert(++i); // shows 6

var i=5; 
alert(i++); // shows 5

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback