1.2.4.1.觀念小叮嚀:古典和原型繼承
繼承 (inheritance)
一個物件可以取用另一個物件的方法
古典繼承 (Classical inheritance)
verbose, 數量過大容易變得複雜
e.g.friend, protected, private, interface
原型繼承 (Prototypal inheritance)
simple, flexible
Last updated
Was this helpful?
繼承 (inheritance)
一個物件可以取用另一個物件的方法
古典繼承 (Classical inheritance)
verbose, 數量過大容易變得複雜
e.g.friend, protected, private, interface
原型繼承 (Prototypal inheritance)
simple, flexible
Last updated
Was this helpful?