+ 2

How do I write something on a new line in JAVASCRIPT?

If i want output: Yo Yo

18th Jun 2020, 2:16 AM
TheCoolTroy
4 Antworten
+ 4
What method are you using for output?
18th Jun 2020, 2:22 AM
Kevin ★
+ 2
console.log("Yo"); console.log("Yo"); console.log('Yo\nYo'); document.write('Yo<br>Yo');
18th Jun 2020, 6:13 AM
Ore
Ore - avatar
+ 1
You can use \n to write on a new line "Yo\nYo"
18th Jun 2020, 3:45 AM
GermoOKD
GermoOKD - avatar
0
\n
19th Jun 2020, 9:27 PM
bob
bob - avatar