当前位置:网站首页>JS settimeout() and interview questions
JS settimeout() and interview questions
2022-07-02 10:40:00 【Big chicken legs are best】
setTimeout(function, milliseconds, param1, param2, ...)
function: It's necessary . To call a code string , It can also be a function .
milliseconds: Optional . Execute or call function Time to wait , In milliseconds . The default is 0.
param1, param2, ... : Optional . Other parameters passed to the executing function ( Pass him the first parameter ).
new Promise(resolve=>{
console.log(1)
setTimeout(resolve,100,4)
console.log(3)
}).then((data)=>{
console.log(data)
})
Output is 1,3,4
Inside setTimeout amount to (resolve(4),100)
So it will output 4
边栏推荐
- 测试--面试题总结
- 【Visual Studio】每次打开一个Unity3D的脚本,都会自动重新打开一个新的VS2017
- 虛幻AI藍圖基礎筆記(萬字整理)
- 01-spooldir
- Shapiro Wilk normal analysis by SPSS
- Pytest framework implements pre post
- 两数之和,求目标值
- pytest--之测试报告allure配置
- Postman -- use
- [unity3d] production progress bar - make image have the functions of filled and sliced at the same time
猜你喜欢
[MySQL] an exception occurs when connecting to MySQL: connection must be valid and open
allure--常用配置项
Mock Server基本使用方法
[jetbrain rider] an exception occurred in the construction project: the imported project "d:\visualstudio2017\ide\msbuild\15.0\bin\roslyn\microsoft.csh" was not found
SPSS做Shapiro-Wilk正态分析
Beautiful and intelligent, Haval H6 supreme+ makes Yuanxiao travel safer
flink 提交程序
[visual studio] every time you open a script of unity3d, a new vs2017 will be automatically reopened
Allure -- common configuration items
Understand the composition of building energy-saving system
随机推荐
高考的意义是什么
[Lua] summary of common knowledge points (including common interview sites)
KS009基于SSH实现宠物管理系统
Allure -- common configuration items
Excuse me, is it cost-effective to insure love life patron saint 2.0 increased lifelong life insurance? What are the advantages of this product?
Considerations for Apache deploying static web page projects
快速做出原型
How to achieve the top progress bar effect in background management projects
Lunix reallocates root and home space memory
数据库字典Navicat自动生成版本
Stm32 et développement de moteurs (système supérieur)
Blender model import UE, collision settings
lunix重新分配root 和 home 空间内存
[unity3d] nested use layout group to make scroll view with dynamic sub object height
Operator exercises
[Fantasy 4] the transformation from U3D to UE4
sqoop创建job出现的一系列问题解决方法
"Talking about podcasts" vol.352 the age of children: breaking the inner scroll, what can we do before high school?
【虚幻4】UMG组件的简介与使用(更新中...)
13. Semaphore critical zone protection