I'm still a newbie to JavaScript and I'm noticing some differences in (syntax only I'm hoping) the way methods are defined.
Some (according to http://www.w3schools.com/js/js_object_methods.asp) are defined as
MyObj = function(){
myMethod: function(){...}
}
Whereas other times they may be defined as
MyObj = function(){
function myMethod(){...}
}
I'm hoping this is just two different ways of doing the same thing, that is also treated (and represented internally) the same way.
Is this the case?
Is it also permissible to write the method in the same pattern as the class such as
MyObj = function(){
myMethod = function(){...}
}