两种自定义函数返回值,你们更喜欢那个
test() {
//使用例子1
this.chec1('abc',function(res){
console.log(res)
})
//使用例子2
console.log(this.chec2('abc'))
},
check1(e,t){
t(e+1)
},
check2(e,t){
return e+2;
},
两种自定义函数返回值,你们更喜欢那个
test() {
//使用例子1
this.chec1('abc',function(res){
console.log(res)
})
//使用例子2
console.log(this.chec2('abc'))
},
check1(e,t){
t(e+1)
},
check2(e,t){
return e+2;
},