main.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
let f = function () {
  this.a = 1;
  this.b = 2;
}

let o = new f();

f.prototype.b = 3;
f.prototype.c = 4;


console.log(o.a);
console.log(o.b);
console.log(o.c);
console.log(o.d);
Native Browser JavaScript