当前位置:网站首页>JS arguments
JS arguments
2022-06-25 04:36:00 【Liujiayi_】
Catalog
(1) When the function is called , The browser passes in two implicit parameters at a time ;
(1) Verify that... Exists arguments
(2)arguments.length It can be used to get the length of arguments
(3) It has an attribute called callee
(1) When the function is called , The browser passes in two implicit parameters at a time ;
1. The context object of the function this
2. The object that encapsulates the argument arguments
(1) Verify that... Exists arguments
<script>
function fun() {
console.log(arguments);
}
fun();
</script>
So there is ;
- arguments It's a Class array object , It can also manipulate data through indexes , You can also get the length
- When the function is called , All the arguments we pass will be in arguments Kept in
Class array object : Let's verify that it's not an array ( The two methods )
<script>
function fun() {
console.log(arguments instanceof Array);
console.log(Array.isArray(arguments));
// console.log(arguments.length);
}
fun();
</script>
Obviously not an array -------- It's an array of classes
(2)arguments.length It can be used to get the length of arguments
<script>
function fun() {
console.log(arguments.length);
}
fun(" Liu ", " home ", " yi ");
</script>
- Even if we don't define formal parameters , It can also be done through arguments To use arguments ,
Just more trouble
arguments[0] Represents the first argument
arguments[1] Represents the second argument ........
(3) It has an attribute called callee
This property corresponds to a function object , Is the object of the function that you are currently pointing to
<script>
function fun() {
console.log(arguments.callee == fun);
}
fun();
</script>
边栏推荐
- Can Navicat directly operate the Android database SQLite
- CTF_ Web: Advanced questions of attack and defense world expert zone WP (9-14)
- 彻底理解数据库事务
- Should I use on or where for the left join
- 简单的恶意样本行文分析-入门篇
- 单元测试覆盖率
- CTF_ Variable coverage in web:php
- GBASE 8s的数据导入和导出
- Gbase 8s stored procedure execution and deletion
- EasyRecovery15非常好用的电脑数据恢复软件
猜你喜欢

Coinlist how to operate the middle lot number security tutorial

重磅直播 | 相移法+多频外差之数学原理推导+实现

CTF_ Web: Advanced questions of attack and defense world expert zone WP (15-18)

【esp32学习之路6——flash加密】

Unit test coverage

CTF_ Web: advanced problem WP (5-8) of attack and defense world expert zone

Gbase 8s index R tree

论文笔记: 多标签学习 ESMC (没看懂, 还没写出来, 暂时放这里占个位置)

Office macro virus bounce shell experiment

Part I Verilog quick start
随机推荐
Paper notes: multi label learning ESMC (I don't understand it, but I haven't written it yet, so I'll put it here for a place temporarily)
Comparison of towe/ JIRA / tapd / Zen collaboration platforms
Blob page in gbase 8s
关于TCP连接四次握手(或者叫四次挥手)的详细总结
A detailed summary of TCP connection triple handshake
Gbase 8s stored procedure syntax structure
Easyrecovery15 very easy to use computer data recovery software
CTF_ Web:php weak type bypass and MD5 collision
CMD operation MySQL in Windows
Leetcode points to the leetcode road of offering II 091 house painting [dynamic planning] heroding
cnpm : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\cnpm.ps1,因为在此系统上禁止运行脚本。
什么是数据持久化?
使用文本分析识别一段文本中的主要性别
GBASE 8s存储过程执行和删除
Laravel document sorting 3. CSRF protection
关于TCP连接三次握手的详细总结
A detailed summary of four handshakes (or four waves) over TCP connections
GBASE 8s 总体架构
L'épée leetcode fait référence au chemin leetcode de l'offre II 091 pour peindre la maison [planification dynamique] heroding
Trigger for gbase 8s