摘要:在js函数的参数里,可以传入一个函数作为参数 例子: var fn = (a)=>{ //如果这个参数a是函数,那么就执行这个函数,否则打印a的值 if(typeof a "function"){ a(); }else{ console.log(a) } } fn(test(2)) function
阅读全文
posted @ 2019-12-15 02:08
6
太棒了
分为
分为分为
的
posted @ 2019-12-15 02:08
posted @ 2019-12-01 18:13
posted @ 2019-12-01 17:24
Copyright Copyright 2025 猫头唔食鱼
Powered by .NET 9.0 on Kubernetes