面向对象

2020-04-22  本文已影响0人  奇怪的知识增加了

swift系列课程

class

class User{
         constructor(name,pass){
                 this.name = name;
                 this.pass = pass
         }
         showName(){
               alert(this.name) 
        }
        showPass(){
               alert(this.pass)
        }
}


//Students 继承User,
class  Students extends User{
           constructor(name,pass,blabl){
                   super(name,pass);
           }
}



React


<script type="text/babel">
上一篇 下一篇

猜你喜欢

热点阅读