摘要:
function attr(name:string):string; function attr(age:number):string; function attr(nameorage:any):any{ if(nameorage &&typeof nameorage ==="string"){//代表当前是名字 alert("ming") }else{ ... 阅读全文
摘要:
let people = { name:["a","b","c","d"], /* getName:function(){ return function(){ var i=Math.floor(Math.random()*4); return { //this 指代的是getName 不是people 引入lamdads即可 ... 阅读全文