Why does this work (returns \"one, two, three\"):
var words = [\'one\', \'two\', \'three\'];
$(\"#main\").append(\'\' + words.join(\", \") + \'
arguments
is not a jQuery object, just a regular JavaScript object. Extend it before you try to call .join()
. I think you would write:
return 'the list:' + $(arguments)[0];
(I'm not too familiar with jQuery, only Prototype, so I hope this is not completely bogus.)
Edit: It's wrong! But in his response, Doug Neiner describes what I'm trying to accomplish.