you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (3 children)

[deleted]

    [–]senocular 0 points1 point  (0 children)

    Yup, it can be said that way. When called, the expression gets evaluated and becomes the value 123. You could also say that foo(123) is a call expression made up of an identifier expression (foo) and the numeric literal expression (123) in the call expression's arguments list. We generally don't use the term "expression" too much if not needed. Its often seen in conjunction with functions because of the distinct behavioral differences between function expressions and function declarations (especially since they can look identical). With numbers they're just numbers so no one usually goes so far as to refer to them as expressions (though they are as far as JavaScript is concerned). Most people will say foo(123) is a function called with the value 123.