0
PLEASE HELP. How do you use line breaks with a variable?
How do I seperate a variable and text with a line break in JS? var x = prompt("ÂżCual es tu nombre?", " "); var answer = ("Hola" + \n "ÂżDe donde eres?"); prompt(answer);
4 Answers
+ 2
The escape "\n" has to be in the string, so:
var answer = "Hola\nÂżDe donde eres?";
+ 1
var answer = "Thanks very much\nIsko!?"
0
hi...
0
I don't know this apps