system — 2011-07-13T23:05:59-04:00 — #1
I'd like to know why this is not writing, specifically the last line. I have the array which is fine but I can't get the last line to write.
document.write ('<p>The First Author is <strong>');
document.write (authors + '</strong></p>');
document.write ('<p>The last author is <strong>');
document.write (authors[authors.length-1] + '</strong></p>');
authors.unshift ('Stan Lee');
document.write ('<p>I almost forgot <strong>' + authors '</strong></p>');
bhawk90 — 2011-07-13T23:08:56-04:00 — #2
You're missing a plus sign between authors and '</strong></p>'.
system — 2011-07-13T23:50:30-04:00 — #3
Odd the error console is saying I'm missing a bracket in the argument list.
document.write ('<p>I almost forgot <strong>' authors + '</strong></p>');
bhawk90 — 2011-07-14T00:07:25-04:00 — #4
You'll still need the plus sign before authors too.
system — 2011-07-14T06:55:24-04:00 — #5
Ahhh right. Add the array between two strings, son of a gun.
bhawk90 — 2011-07-14T13:24:08-04:00 — #6
system — 2011-07-14T23:19:41-04:00 — #7
Interesting, I don't know what Ruby can do but I see it is a little more simpler.