题解 | #模块#

模块

http://www.nowcoder.com/practice/48e53feaabe94506a61300edadb5496d

***题目吧。。。saylt 死都过不了 要不是看到有人评论sayIt 一辈子都做不出来

{"css":"","js":"\nfunction createModule(str1, str2) {\n    function Obj(str1, str2){\n        this.greeting = str1;\n        this.name = str2;\n        this.sayIt = function(){\n          return this.greeting + \", \" + this.name\n        }\n    }\n    var obj = new Obj(str1, str2);\n    return obj;\n}\n","html":"","libs":[]}
全部评论
哈哈哈哈,sayIt 的I有毒
点赞
送花
回复 分享
发布于 2022-01-09 20:59
开始看到这题目较难级别,总感觉哪里有坑,没想到是这种坑
点赞
送花
回复 分享
发布于 2022-06-24 15:24
国泰君安
校招火热招聘中
官网直投

相关推荐

头像
05-14 12:29
安卓
点赞 评论 收藏
分享
点赞 收藏 评论
分享
牛客网
牛客企业服务