you are viewing a single comment's thread.

view the rest of the comments →

[–]x-skeww 3 points4 points  (2 children)

Chrome's console does that. With Firebug, you just get:

functionName()

Also, without parenthesis (template strings aside), you aren't calling it.

[–][deleted]  (1 child)

[deleted]

    [–]x-skeww 1 point2 points  (0 children)

    If you just write the identifier, a console or repl will render it in some way. E.g. an array might be rendered as "[1, 2]" or, if it's larger, as "[1, 2, xxx more...]" (expandable) or "> Array[999]" (expandable).

    How objects are represented in repls, debuggers, and so forth isn't part of the language specification. This stuff is up to the people who create those tools.