I believe the reason a function or method in an object does not need the “function” keyword has to do with the fact that JS is built on the prototype model and the fact that functions are first class in JS.
As the saying goes, “Everything is an object in JavaScript…” (which is not strictly true).
I believe the reason a function or method in an object does not need the “function” keyword has to do with the fact that JS is built on the prototype model and the fact that functions are first class in JS.
As the saying goes, “Everything is an object in JavaScript…” (which is not strictly true).