user2205909
user2205909

Reputation:

How to have output on one line in javascript

I know this is probably so simple but I have tried /s to get spaces between my words.document.write('You have been alive' + */s userMsDays /s* + 'days');

I have tried +''+ to have code output to one line document.write('<li><font color="red">emotional:</font></li>' + *''+ bioEmot +''*);

Upvotes: 0

Views: 91

Answers (1)

David G
David G

Reputation: 96810

You simply input the spaces inside the string:

document.write('You have been alive ' + userMsDays + ' days');

Upvotes: 2

Related Questions