0

How to break line in javascript

I want to break line in an array and write it by innerText but it is not working either with \n or <br/> but when I use document.write it work. I want to use innerText please tell me how to do it.

12th Nov 2020, 4:55 PM
Charchit Dahiya
Charchit Dahiya - avatar
5 odpowiedzi
+ 2
As you mentioned here that <br /> tags is not working with innerText Let's take a revision InnerText is use to change text of selected content While InnerHtml is used of change or add html to that content Hope it will solve your problem If not edit your post and add the code for better understanding for us Happy coding ☺️
12th Nov 2020, 5:49 PM
Stuvan
Stuvan - avatar
0
My problem is not listed here.
12th Nov 2020, 5:02 PM
Charchit Dahiya
Charchit Dahiya - avatar
13th Nov 2020, 3:42 AM
🇮🇳Vivek🇮🇳
🇮🇳Vivek🇮🇳 - avatar
0
Vivek thanks a lot. It worked
13th Nov 2020, 6:35 AM
Charchit Dahiya
Charchit Dahiya - avatar