Typescript 入門(三)-類

一、在ES5中類定義和繼承  1、定義類 function Peson(name,age){  this.name = name;  this.age = age; }  Person.prototype.display = function(){  console.log(this.name + '\t'+ this.age) } var p = new Person(); 2、靜態方法 Per
相關文章
相關標籤/搜索