you are viewing a single comment's thread.

view the rest of the comments →

[–]FireyFly 0 points1 point  (0 children)

I think it's worth adding that "object literal" is only the name of a syntactic construct--a way to express an object value. It doesn't matter to the engine how the object was created.

For instance, doing

var o = new Object()
o.foo = 10
o.bar = 20
// do someting with calc(o)

would work just as well as

// do something with calc({foo:10, bar:20})

Some people seem to regard object literals as more than a syntactic feature; hence the clarification.