I would like to know if my approach is efficient and correct. my code is not working though, I don\'t know why.
alert("myVar1= " + myVar1 +"/n"+ "myVar2= " + myVar2);
Placing /n in side of your string in an alert box will allow you to display multiple vars with nifty line breaks in an alert box.
myVar1= Data myVar2= more Data