niche Posted July 8, 2011 Share Posted July 8, 2011 Why doesn't this display [ window, 'one', 'two' ] ? <html><head><script type="text/javascript"> function makeArray(arg1, arg2){ return [ this, arg1, arg2 ]; } window.makeArray('one', 'two'); </script> </head><body></body></html> Link to comment Share on other sites More sharing options...
Ingolme Posted July 8, 2011 Share Posted July 8, 2011 It doesn't display anything because you're not doing anything with the value that's returned from the function. Link to comment Share on other sites More sharing options...
niche Posted July 8, 2011 Author Share Posted July 8, 2011 Thanks Ingolme. I had that problem when I was learning PHP. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.