<分区>
我真的很抱歉这个标题,如果我在这里问这个菜鸟问题我很抱歉,因为我不知道这个在谷歌中的关键字是什么。
好的,首先我是 javascript 的新手,并且仍在学习这种编程语言。所以我已经看到了很多,但我不知道它是什么意思
var myapp = function(){
var a = 'a';
var b = function(){
//some code goes here
}
return {
init: function(){
b();
//some code goes here
}
}
}() <-- what is it?;
所以我一直想知道这个符号“()”最后的作用是什么。为什么很多人在变量中编写函数?