js自调用匿名函数的三种写法(推荐)
发布时间:2016-12-30 来源:查字典编辑
摘要:第一种:(function(){console.log(‘helloworld”)})()第二种:(function(){console.l...
第一种:
(function(){ console.log(‘hello world”) })()
第二种:
(function(){ console.log(‘hello world') }())
第三种:
!function(){ console.log(‘hello world') }()
以上这篇js自调用匿名函数的三种写法(推荐)就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持查字典教程网。