- 链接地址:https://blog.csdn.net/rambler_designer/article/details/106422556
- 链接标题:JavaScript函数零散知识点_new function return 1 2-CSDN博客
- 所属网站:blog.csdn.net
- 被收藏次数:8686
函数声明的三种方式var fun = new Function("return 1+2");console.log(fun()); // 输出3// 第二种方式 (函数声明)function fun2() { return 2 + 3;}console.log(fun2());// 输出5// 第三种函数 (表达式方式声明函数)var fun3 = function(){ return 4 + 5;}console.log(fun3()); // 输出9函数的实参_new function return 1 2
版权声明:本文发布于特牛网址导航 内容均来源于互联网 如有侵权联系删除