I have been trying to learn OO JS. I was playing with different patterns, wrote following example.
var obj = function() {
    this.a= function() {
        return 'a';
    } 
}
obj.prototype.b = function() {
    return 'b';
} 
var instance = new obj();
console.log(instance.a());
console.log(instance.b()); 
Is there any difference here in function a and b?
 
     
    