+ 1
how to print colored output using javasvcript ?
I want to print my pattern in red color how to do that I am getting error.. https://code.sololearn.com/WxEBM9ths6R4/?ref=app
2 ответов
+ 2
You forgot to add `` to print the string inside document.write() and print red color using style inside the pre-element. It would be something like this:
https://code.sololearn.com/WA13A8A12a20
+ 1
Ratnapal Shende
here is a reworked version, using dom element insertion rather than document write, and array map method to output in textContent property of inserted element
https://code.sololearn.com/WibgShoa3PE5/?ref=app