You are here: irt.org | About | Feedback | 3235 [ previous next ]
Feedback on:
irt.org FAQ Knowledge Base Q1665
Sent by
Patrik Carlsson on October 11, 2001 at 07:50:40:
Technical:
Not technical enough
Comments:
There's more to it than just () and [], what if you leave them out:
function functionName()
{
// <b>Return a string
alert('test'); return 'Hello';
// </b>
}
document.write(functionName());
document.write('<pre>');
document.write(functionName);
document.write('</pre>');
This seems useful for "literal programming" and sites like yours. Currently Netscape seems to scrap off the comments and format the code K&R-style while IE actually interprets html tags in comments.
Are there any other hidden properties of functions?
Patrik