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 Respuestas
+ 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