当前位置:网站首页>JSCORE day_ 01(6.30) RegExp 、 Function
JSCORE day_ 01(6.30) RegExp 、 Function
2022-07-27 00:47:00 【Add 1 bed of bedding】
Xiaoxin teacher's personal website :
xin88.top
Include all the attention events in this stage , Related software , Video etc.
Stage content
1 Stage :
Basics - Cheng LiangThe foundation of the server node.js express mysql...2 Stage : WEB Basics
HTML CSSSASS AJAX bootstrap Cloud server3 Stage : WEB Page upgrade - JS The core
discuss : JS Core design concept of , principle --
Interview questions must be examinedNew syntax : ES5 6 7 8 ... The new version of the JS grammar , Make code writing easier
DOM. jQuery: utilize JS Dynamically operate web pages
Vue: Current world ranking Top three web frame , At home No.1
4 Stage : Advanced content + Mobile terminal development
5 Stage : More advanced framework knowledge
One 、 Declaration upgrade
JS Of
WeirdoDesign , The code you see and The actual code executed DissimilarityJS The engine will first hold The declaration operation in the code is promoted to the top of the scope , Then execute the code after adjusting the order




Interview questions



Host environment : JS The environment in which it runs , for example browser and node.js
The browser provides window object , It includes all systems attribute / Method
window The object is called Global object / Global scope

Local scope
Function in Runtime temporary Generated objects , Used to store variables declared in functions
Scope : The name of an object with special functions
Global scope : The method of storing the system / attribute -- window
Local scope : Function execution time Temporarily generated objects , Stored the variables declared in the function
Need a browser Breakpoint debugging function , To see
- Scope chain : When the scope is nested at multiple levels , Using a variable will follow
Nearby principleGive priority to the nearest one in theThe upperscoped


Closure Closure:
When a function is declared , I will use myself Variables from other scopes , The scope is saved in its own scopes In the attribute
Why? : Avoid destruction
Tianyu case : fear QQ Membership expires , Download Music locally in advance
What can we do with closure features ?
Make private variables for functions , Avoid global pollution
shortcoming : Waste of memory To store closure scope for a long time
arguments: A hidden attribute of the function
effect : Store the arguments of all functions
application :
Make a function with an indefinite number of arguments -- For example, find the maximum value
function overloading : Using arguments Number / type Different , Implement different code logic
To make a
multi-functionFunction of



Application of closures





arguments
Function , Hide one of its own properties / Variable
effect : Save the function received
All argumentsApplication scenarios :
Make a function with an indefinite number of arguments , for example : For maximum
function overloading : Making multifunctional functions , According to the number of arguments or type Different , Make internal judgments Then execute different code logic

function overloading

this
this: A property in the function , Represents the object where the function is used
Rough understanding
object . function (): Functional this Is the object in front
function (): this Namely window



Reference type
Reference type : The object is address passing , Reference type



Shallow copy


Attribute access

边栏推荐
- 输入一串字母 将里面的元音输出希望各位大佬能给指导
- The company gave how to use the IP address (detailed version)
- C language to find prime numbers, leap years and minimum common multiples and maximum common divisors
- TypeScript(tsconfig.json)
- Input a string of letters and output the vowels inside. I hope you guys can give guidance
- c语言 比大小的多种描述,不要只拘泥于一种写法
- 【4.4 快速幂详解及快速幂求逆元】
- [CISCN2019 华北赛区 Day1 Web2]ikun
- Blue Bridge Cup 1004 [recursive] cow story
- 5_ Linear regression
猜你喜欢

Application of encoding in XSS

Parallel MPI program delivery send message
![[WUSTCTF2020]CV Maker](/img/64/06023938e83acc832f06733b6c4d63.png)
[WUSTCTF2020]CV Maker

【AcWing第61场周赛】

Use of postman

el-checkbox中的checked勾选状态问题 2021-08-02

QML type system

Leetcode high frequency question: the choice of the inn, how many options to choose accommodation, to ensure that you can find a coffee shop with a minimum consumption of no more than p yuan in the ev

9_ Logistic regression

继承,继承,继承
随机推荐
10个Web API
[Qt]解决中文乱码问题
SSRF explanation and burp automatic detection SSRF
JSCORE day_01(6.30) RegExp 、 Function
DOM day_01(7.7) dom的介绍和核心操作
[HITCON 2017]SSRFme
[Network Research Institute] attackers scan 1.6 million WordPress websites to find vulnerable plug-ins
Parallel MPI program delivery send message
关于Redis问题的二三事
寻找真凶
[WUSTCTF2020]CV Maker
[3. Basic search and first knowledge of graph theory]
Two methods of automated testing XSS vulnerabilities using burpsuite
【 Educational Codeforces Round 132 (Rated for Div. 2) A·B·C】
CUDA version difference between NVIDIA SMI and nvcc -v
[watevrCTF-2019]Cookie Store
My first blog - confused junior
C语言 求素数、闰年以及最小公倍数最大公约数
Detailed explanation of arrow function 2021-04-30
我的第一篇博客-迷茫的大三人