当前位置:网站首页>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 (
边栏推荐
- Halcon image calibration enables subsequent image processing to become the same as the template image
- Talk about the SQL server version of DTM sub transaction barrier function
- (4) Canal multi instance use
- [Excel] 数据透视图
- Design and implementation of tcp/ip series overview
- BeanFactoryPostProcessor 与 BeanPostProcessor 相关子类概述
- LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
- 检漏继电器JY82-2P
- Ping port artifact psping
- js arguments参数使用和详解
猜你喜欢
[wechat applet] template and configuration (wxml, wxss, global and page configuration, network data request)
拓扑排序和关键路径的图形化显示
光模块字母含义及参数简称大全
企业级日志分析系统ELK(如果事与愿违那一定另有安排)
One click filtering to select Baidu online disk files
卸载Google Drive 硬盘-必须退出程序才能卸载
JS扁平化数形结构的数组
LM小型可编程控制器软件(基于CoDeSys)笔记二十一:错误3703
LM small programmable controller software (based on CoDeSys) note XXI: error 3703
冲击继电器JC-7/11/DC110V
随机推荐
Yyds dry goods inventory TCP & UDP
Leetcode 184 Employees with the highest wages in the Department (July 3, 2022)
BUU-Reverse-easyre
Thread pool: use thread pool to optimize query speed
509. 斐波那契数、爬楼梯所有路径、爬楼梯最小花费
1.1 history of Statistics
Integer type of C language
光模块字母含义及参数简称大全
Principle and practice of common defects in RSA encryption application
transformer坑了多少算力
XII Golang others
十二. golang其他
Penetration tool - sqlmap
Kubernets first meeting
Simulink and Arduino serial port communication
19. Framebuffer application programming
数据标注是一块肥肉,盯上这块肉的不止中国丨曼孚科技
ansys命令
Actual cases and optimization solutions of cloud native architecture
[interested reading] advantageous filtering modeling on long term user behavior sequences for click through rate pre