How do I write something on a new line in JAVASCRIPT? | Sololearn: Learn to code for FREE!

+2

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

If i want output: Yo Yo

6/18/2020 2:16:35 AM

TheCoolTroy

5 Answers

New Answer

+4

What method are you using for output?

+3

Kindly prefer to use our searchbar before asking a new question to avoid duplicates Some of them , I've listed below 👇👇👇 https://www.sololearn.com/Discuss/1537964/?ref=app https://www.sololearn.com/Discuss/1622175/?ref=app https://www.sololearn.com/Discuss/1904018/?ref=app https://www.sololearn.com/Discuss/1046237/?ref=app https://www.sololearn.com/Discuss/250603/?ref=app https://www.sololearn.com/Discuss/1880688/?ref=app https://www.sololearn.com/Discuss/1600999/?ref=app https://www.sololearn.com/Discuss/198068/?ref=app https://www.sololearn.com/Discuss/1609766/?ref=app

+2

console.log("Yo"); console.log("Yo"); console.log('Yo\nYo'); document.write('Yo<br>Yo');

+1

You can use \n to write on a new line "Yo\nYo"

0

\n