0

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 +''*);

2
  • 1
    What's */s and /s* supposed to be? Commented Mar 23, 2013 at 0:43
  • @tjameson /s can be used in regular expressions to denote a space character. I think that's where he got it from. Commented Mar 23, 2013 at 0:44

1 Answer 1

2

You simply input the spaces inside the string:

document.write('You have been alive ' + userMsDays + ' days');
Sign up to request clarification or add additional context in comments.

4 Comments

when i tried to use the italic button it put the * before and after. Thank you for that,I know have my sapces but do you know how to have this document.write('<li><font color="red">emotional:</font></li>' + bioEmot ); appear on one line instead of two
ok i put () around bioEmot and that put that all up on one line but took away the list point. So now have output as : emotional:0.8. So not sure how to fix.
@ David sorry I didn't see your comment, and was so excited that I thought I had fixed it, I posted and then felt like an idiot when it still didn't work, so came back and deleted last two posts. The <li> point in front of the output
@Sonya1m You should post that as a separate question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.