题解 | #使用闭包#

使用闭包

https://www.nowcoder.com/practice/578026cd24e3446bbf27fe565473dc26

{"html":"<!DOCTYPE html>\n<html>\n\n<head>\n    <meta charset=\"UTF-8\">\n    <style>\n       /* 填写样式 */\n    </style>\n</head>\n\n<body>\n    <!-- 填写标签 -->\n    <script type=\"text/javascript\">\n        // 填写JavaScript\n        function makeClosures(arr, fn) {\n            let obj ={};\n            arr.forEach((item,index)=>{\n                obj[index] = function(){return fn(item)}\n            })\n            obj.length = arr.length;\n            return obj\n}\n    </script>\n</body>\n\n</html>","css":"","js":""}

全部评论

相关推荐

MingoTree:看不出你你的技术栈,想找什么工作,然后课设项目别写上去了,自我评价删了,前后端你想好你要干啥,这种简历投上去秒挂的
点赞 评论 收藏
分享
kl_我是东山啊:《相关公司:阿里巴巴》
投递阿里巴巴等公司10个岗位
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务