当前位置:网站首页>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
边栏推荐
- Distributed message oriented middleware framework selection - Digital Architecture Design (7)
- JS prototype chain
- Kettle experiment (III)
- nn. Explanation of module class
- Canary publishing using ingress
- Enter "net start MySQL" and "system error 5. Access denied" appears. Detailed explanation of the problem
- What is augmented reality technology? Where can it be used?
- npm ERR! network
- Summary of wrong questions 1
- 三、6【Verilog HDL】基础知识之门级建模
猜你喜欢

The most concerned occupations after 00: civil servants ranked second. What was the first?
![3、 6 [Verilog HDL] gate level modeling of basic knowledge](/img/36/46f2413ecb12f81c003848c93f6bc9.jpg)
3、 6 [Verilog HDL] gate level modeling of basic knowledge

Applet error: should have URL attribute when using navigateto, redirectto or switchtab
![[C language] document operation](/img/89/b19dda13d27e37fedf6736c102245b.png)
[C language] document operation

What is augmented reality technology? Where can it be used?

MySQL小練習(僅適合初學者,非初學者勿進)

108. Convert an ordered array into a binary search tree

Base de la technologie électronique numérique 3.1 aperçu du circuit de porte, 3.2 circuit de porte à diode semi - conductrice

错题汇总1
![[geek challenge 2019] havefun1](/img/8b/b15bf31771d54db25f24d630e64093.png)
[geek challenge 2019] havefun1
随机推荐
[in-depth good article] detailed explanation of Flink SQL streaming batch integration technology (I)
小程序报错 :should have url attribute when using navigateTo, redirectTo or switchTab
NPM installation yarn
Four pictures to understand some basic usage of Matplotlib
Kettle experiment conversion case
DJ music management software pioneer DJ rekordbox
[indexof] [lastIndexOf] [split] [substring] usage details
MySQL of database -- overview and installation
JS prototype chain
员工试用期转正申请书(泸州老窖)
Image processing in opencv -- Introduction to contour + contour features
108. 将有序数组转换为二叉搜索树
MySQL小練習(僅適合初學者,非初學者勿進)
MySQL small exercise (only suitable for beginners, non beginners are not allowed to enter)
Get trustedinstaller permission
About CIN, scanf and getline, getchar, CIN Mixed use of getline
Kettle实验
资源打包关系依赖树
Kettle experiment
Withholding agent