//1.定义要实现的接口
var Interface=function(name,methods){
//接口方法
if(agruments.length!=2){
throw new Error("Interface constructor called with "+arguments.length+"arguments,but expected exactly 2");
}
this.name=name;
this.methods=[];
for(var i=
JS实现接口(鸭式辨型)
最新推荐文章于 2021-02-19 14:07:22 发布
//1.定义要实现的接口var Interface=function(name,methods){//接口方法 if(agruments.length!=2){ throw new Error("Interface constructor called with "+arguments.length+"arguments,but expected exactly 2");
摘要由CSDN通过智能技术生成