javascriptにおける自己実行(コール)関数の2つの書き方
1985 ワード
書き方一:
<script>
(function (n1,n2){
console.log(" , :"+(n1+n2))
})(10,100)//110
(function start(n1,n2){
console.log(" , :"+(n1+n2))
})(10,100)//110
script>
書き方二:<script>
(function (n1,n2){
console.log(" , :"+(n1+n2))
}(10,100))//110
(function start(n1,n2){
console.log(" , :"+(n1+n2))
}(10,100))//110
script>