You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
面向对象有三个特点,一个个来说 封装私有变量利用闭包实现对象的私有变量。 12345678910function Animal (age) { this.getAge = function () { return age }}var dog = new Animal(3)console.log(dog.age) // undefinedconsol
http://hpoenixf.com/posts/37425/
面向对象有三个特点,一个个来说 封装私有变量利用闭包实现对象的私有变量。 12345678910function Animal (age) { this.getAge = function () { return age }}var dog = new Animal(3)console.log(dog.age) // undefinedconsol