当前位置:网站首页>JS arguments parameter usage and explanation
JS arguments parameter usage and explanation
2022-07-04 05:41:00 【Tianma 3798】
One 、arguments Parameter Introduction
arguments, It is js An object built into a function in , The values of the actual parameters of the execution function method are stored in arguments in ;
To get these arguments , It needs to be like an array , Use subscript / Index to locate each value , But it can't be said to be an array , Because it has other properties , Such as callee;
And you can't use it shift、push、join Other methods .
Named parameters that do not pass values are automatically assigned undefined;
arguments.length---- Number of parameters
arguments.callee()--- Adjust the Commission itself
Two 、 Use cases
Case study 1:
function show() {
console.info(arguments);
//arguments.callee()
}
show();
show(1, 2);
show(window, 1)
Case study 2:
function sum() {
var result = 0;
for (
边栏推荐
- Descriptive analysis of data distribution characteristics (data exploration)
- How to configure static IP for Kali virtual machine
- VB. Net simple processing pictures, black and white (class library - 7)
- C language simple student management system (including source code)
- Use of hutool Pinyin tool
- 十二. golang其他
- tutle时钟改进版
- FreeRTOS 中 RISC-V-Qemu-virt_GCC 的 锁机制 分析
- js如何将秒转换成时分秒显示
- Overview of relevant subclasses of beanfactorypostprocessor and beanpostprocessor
猜你喜欢
Kubernets first meeting
2022年A特种设备相关管理(电梯)考试题模拟考试平台操作
LM small programmable controller software (based on CoDeSys) note 22: error 4268/4052
卸载Google Drive 硬盘-必须退出程序才能卸载
Actual cases and optimization solutions of cloud native architecture
Graduation design of small programs -- small programs of food and recipes
724. 寻找数组的中心下标
LM small programmable controller software (based on CoDeSys) note XXI: error 3703
Steady! Huawei micro certification Huawei cloud computing service practice is stable!
Simulink与Arduino串口通信
随机推荐
input显示当前选择的图片
FreeRTOS 中 RISC-V-Qemu-virt_GCC 的 锁机制 分析
Tutle clock improved version
VB.net GIF(制作、拆解——优化代码,类库——5)
拓扑排序和关键路径的图形化显示
JS string splicing enhancement
RSA加密应用常见缺陷的原理与实践
js如何将秒转换成时分秒显示
[QT] create mycombobox click event
Viewing and using binary log of MySQL
Kubernets first meeting
Wechat applet +php realizes authorized login
Simulink与Arduino串口通信
Easy change
2022年R2移动式压力容器充装复训题库及答案
BUU-Pwn-test_ your_ nc
Halcon image calibration enables subsequent image processing to become the same as the template image
Kubernets first meeting
总线的基本概念
724. Find the central subscript of the array