On 1/14/11 11:36 AM, Poetro wrote:
2011/1/14 Amit Agarwal<[email protected]>:
name property of a function returns its name.

(function (){
     console.log(arguments.callee.name);
})();

Above code prints "(an empty string)" instead of "". Why?
Where does it print "(an empty string)"? It doesnt print for me
anything in Opera, Chrome or Node.js, While IE8 prints "undefined".
My guess is Firebug? I recall a discussion on the firebug list about what should be printed for an empty string logging. (as the quotes don't appear in the output, the line would be 0 height if nothing was printed)

>> function bar(){ return ""; } bar();
""
>> console.log("");
(an empty string)
undefined
>> console.log("a");
a
undefined
>> console.log('"');
"
undefined


~phiggins

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to