+ 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

16th Jun 2021, 4:10 PM
Ratnapal Shende
Ratnapal Shende - avatar
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
16th Jun 2021, 4:22 PM
The future is now thanks to science
The future is now thanks to science - avatar
+ 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
16th Jun 2021, 6:02 PM
visph
visph - avatar