what is the difference between the following two prototypes of inherited development when learning about plug-in encapsulation?
function Dialog () {}
Dialog.prototype.fun1 = function () {
console.log ("fun1");
}
Dialog.prototype.fun2 = function () {
console.log ("fun2");
}
Dialog.prototype = {
constructor: this,
fun1:function () {
console.log("fun1");
},
fun2:function () {
console.log("fun2");
}
}