Help me get line breaks in Javascript? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Help me get line breaks in Javascript?

I dunno if I can do this but I have a code that helps me find the smallest amount of coins for any given number between 1-99 and I was wondering how I can get the final output to come more like this 1 quarter(s) 0 dime(s) 0 nickel(s) 1 penny(ies) rather than 1 quarter(s) 0 dime(s) 0 nickel(s) 1 penny(ies). Can I do that within Javascript itself or should this be fixed within the html?

14th Apr 2017, 4:49 PM
Zac Parnell
Zac Parnell - avatar
2 Answers
+ 6
Append them with <br> tag.
14th Apr 2017, 4:53 PM
Ashwani Kumar
Ashwani Kumar - avatar
0
Thank you!
14th Apr 2017, 4:54 PM
Zac Parnell
Zac Parnell - avatar