当前位置:网站首页>JS function and variable have the same name (function and variable parsing rules)
JS function and variable have the same name (function and variable parsing rules)
2022-06-12 04:22:00 【Blue island】
console.log(a)
var a = 3
function a(){}
- 1.
- 2.
- 3.
Print :ƒ a() {}
analysis :
1、 The function declaration will be at the top , Variable declarations will be at the top , Function declarations are more important than variable declarations
2、 Variable declaration and assignment are written together (var),js When parsing, the engine will split it into two parts: Declaration and assignment , The statement tops , The resolution remains in its original position ( This only refers to var The way ,let and const Has block level scope , And the declared variables are not mounted to window On )
3、 Declared variables will not be declared repeatedly
The above expression is equivalent to :
function a() {}
var a
console.log(a)
a = 3
- 1.
- 2.
- 3.
- 4.
边栏推荐
- FOB,CIF,CFR的区别是什么?
- 1. Mx6ull learning notes (II) - uboot migration
- R语言plotly可视化:使用plotly可视化简单线性回归模型的回归线(simple regression model linear regression plots)
- Plot visualization in R language: visualize the scatter diagram of the actual value and the predicted value of the regression model, analyze the prediction efficiency of the regression model, distingu
- Sqel easy to use
- Street lighting IOT technology scheme, esp32-s3 chip communication application, intelligent WiFi remote control
- php和js去掉所有空格
- Yyds dry inventory MySQL learning - how transactions are isolated
- 疫情数据分析平台工作报告【6.5】疫情地图
- [C language] analysis of variable essence
猜你喜欢
![[软件工具][原创]voc数据集类别名批量修改工具使用教程](/img/25/31d771c9770bb7f455f35e38672170.png)
[软件工具][原创]voc数据集类别名批量修改工具使用教程

1. Mx6ull learning notes (II) - uboot migration

无线物联网WiFi模块方案,ESP32-S3芯片技术,助力设备智能化
![Work report of epidemic data analysis platform [1] data collection](/img/3d/b58c2d3f7fd6051e35d1cea535f858.png)
Work report of epidemic data analysis platform [1] data collection

SQL Safe Backup显示器和缩放字体的支持

E-commerce middle office system architecture

Successfully solved: warning: there was an error checking the latest version of pip
![[Clickhouse column] user initialization of new library role](/img/00/a11fb1a8e38ed4e0634839160c8ead.png)
[Clickhouse column] user initialization of new library role

智能面板WiFi聯動技術,ESP32無線芯片模組,物聯網WiFi通信應用

【FPGA+FFT】基于FPGA的FFT频率计设计与实现
随机推荐
树莓派4B使用Intel Movidius NCS 2来进行推断加速
智能面板WiFi联动技术,ESP32无线芯片模组,物联网WiFi通信应用
Recommended system cleaning tools, cocktail Download
Pat class B 1067 trial password (20 points)
Plot visualization in R language: visualize the scatter diagram of the actual value and the predicted value of the regression model, analyze the prediction efficiency of the regression model, distingu
Raspberry pie 4B uses Intel movidius NCS 2 for inference acceleration
手动封装一个forEacht和Map
Legendary biological car-t has been approved by FDA, becoming the first domestic cell therapy product to successfully go to sea
Oracle's instr()
Drop down menu dropdown yyds dry inventory of semantic UI
PHP and JS remove all spaces
[Clickhouse column] user initialization of new library role
Esp32c3 remote serial port
Kotlin 启动协程、launch 与async的区别、按照顺序启动协程
[C language] analysis of variable essence
MFC General dialog color dialog
Double objective learning materials sorting
Naive Bayes classification of scikit learn
FOB,CIF,CFR的区别是什么?
Work report of epidemic data analysis platform [6.5] epidemic map