JS高级---数组的函数调用
数组的函数调用
数组可以存储任何类型的数据
在数组里写入函数,回调函数:函数作为参数使用
//数组可以存储任何类型的数据 var arr=[ function () { console.log("十一假期快乐"); }, function () { console.log("十一假期开心"); } , function () { console.log("十一假期健康"); } , function () { console.log("十一假期安全"); }, function () { console.log("十一假期如意"); } ]; //回调函数:函数作为参数使用 arr.forEach(function (ele) { ele(); });
你好,我是Jane,如果万幸对您有用,请帮忙点下推荐,谢谢啦~另外,咱们闪存见哦~

浙公网安备 33010602011771号