Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to <br> in javascript?

I’m trying to write an article using JavaScript, but the break tag doesn’t work. Am I using the wrong tag? I tried using the n tag, but I can’t tell if I’m using it right.

Any help is very much appreciated, thank you!

Here's my code.
{"url":"photos/headers/ABY-header.png",
"link":"index.html", 
"name": "Text here (and then break) continue text here."},

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I think \n will work here

const link = {"url":"photos/headers/ABY-header.png",
"link":"index.html", 
"name": "Text here \ncontinue text here."} // you can leave space after \n

console.log(link.name)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading