© 2026 LinearBytes Inc.
Search posts, tags, users, and pages
cedric simon
Web dev
In your second sample, the grow method, shouldn't it be declared like grow:function()? Maybe it's a syntax I am not aware of...
grow
grow:function()
Neha Bharati
Web Developer
Yes that's the shorthand for declaring a method. You can define it either way.