could anyone please tell me, where in Javascript the difference between
MyClass.prototype = new Object(); //or ... = {}
and
MyC
MyClass.prototype.method1: function () {/**/};
Correction to the above: it should be
MyClass.prototype.method1 = function () {/**/};
(Note the equals sign after 'method1').
The colon is used only when the method definition is itself within an object definition, like:
var myObject = {myVar1: 10, myMethod1: function() { /* */};