当前位置:网站首页>Two declaration methods of functions of JS
Two declaration methods of functions of JS
2022-04-23 09:22:00 【Small white egg tart】
Catalog
The first is to use function keywords to customize functions ( Name the function )
The second function expression ( Anonymous functions )
The first is to use function keywords to customize functions ( Name the function )
The format is as follows :
function Function name (){
}
Invocation time fn();
function fn() {
}
The second function expression ( Anonymous functions )
The format is as follows :
var Variable name = function(){
}
Different from defining variables , What is stored in the definition variable is the variable , What is stored in this is the function .
It's also called fun(), Parameters can also be passed in parentheses .
var fun = function(arr, arr1) {
// console.log(arguments[1]);
console.log(arr);
console.log(arr1);
}
版权声明
本文为[Small white egg tart]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230624114368.html
边栏推荐
- How to read excel table to database
- Using JS to realize a thousandth bit
- Go language learning notes - structure | go language from scratch
- Two ways for flutter providers to share data
- Kettle experiment
- Find the sum of simple types of matrices
- 小女孩行走
- Cross domain configuration error: when allowcredentials is true, allowedorigins cannot contain the special value "*“
- Kettle experiment (III)
- Image processing in opencv -- Introduction to contour + contour features
猜你喜欢

三、6【Verilog HDL】基础知识之门级建模

npm ERR! network

Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem

MySQL of database -- basic common query commands

【读书笔记】《Verilog数字系统设计教程》 第5章 条件语句、循环语句和块语句(附思考题答案)

I don't understand time, timestamp and time zone. Look at this article

SAP 101K 411K 库存变化

Principle of synchronized implementation

【SQL server速成之路】数据库的视图和游标

NLLLoss+log_ SoftMax=CE_ Loss
随机推荐
SAP 101K 411K 库存变化
Go language self-study series | golang structure as function parameter
Applet error: cannot read property'currenttarget'of undefined
Kettle实验 (三)
Vivo, hardware safe love and thunder
First principle mind map
資源打包關系依賴樹
Using sqlmap injection to obtain the account and password of the website administrator
Matlab draw five-star red flag
NPM installation yarn
【读书笔记】《Verilog数字系统设计教程》 第5章 条件语句、循环语句和块语句(附思考题答案)
Using JS to realize a thousandth bit
三、6【Verilog HDL】基础知识之门级建模
Mini - exercice MySQL (seulement pour les débutants, pas pour les non - débutants)
Go language self-study series | golang structure pointer
小程序报错:Cannot read property 'currentTarget' of undefined
Go language learning notes - slice, map | go language from scratch
js 原型链的深入
Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
Unfortunately, I broke the leader's confidential documents and spit blood to share the code skills of backup files