How can I make an alert in JS that includes text a variable? I have tried this code, but something is wrong.
Code:text1 = "This is a string";
alert("This is another string\n" && tekst);
Printable View
How can I make an alert in JS that includes text a variable? I have tried this code, but something is wrong.
Code:text1 = "This is a string";
alert("This is another string\n" && tekst);
Hi,
its + for strings, and also for integers. Also try using ' instead of "
Code:text1 = 'This is a string';
alert('This is another string\n' + text1);