Posted 2022-09-10Javascript2 minutes read (About 373 words)衍生內建建構器的子類別 subclassSubclassing a built-in 的兩個障礙:Obstacle 1 帶有內部特性的實體12345678910function Super(x, y){ this.x = x; this.y = y;}function Sub(x, y ,z){ Super.call(this, x, y); this.z = z;} 內建建構器會忽略傳入傳入作為this的子實體Read more