当前位置:网站首页>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
边栏推荐
- MongoDB-快速上手MongoDB命令行的一些简单操作
- Edge computing accelerates live video scenes: clearer, smoother, and more real-time
- sqoop创建job出现的一系列问题解决方法
- AttributeError: type object ‘Image‘ has no attribute ‘fromarray‘
- js setTimeout()与面试题
- 【JetBrain Rider】构建项目出现异常:未找到导入的项目“D:\VisualStudio2017\IDE\MSBuild\15.0\Bin\Roslyn\Microsoft.CSh
- Flink calculates topn hot list in real time
- Ctrip starts mixed office. How can small and medium-sized enterprises achieve mixed office?
- [IDL] Research
- 判断数组中是否存在重复元素
猜你喜欢
Aiphacode is not a substitute for programmers, but a tool for developers
"Matching" is true love, a new attitude for young people to make friends
Sus system availability scale
Blender摄像机环绕运动、动画渲染、视频合成
How to achieve the top progress bar effect in background management projects
Delivery mode design of Spartacus UI of SAP e-commerce cloud
Blender海洋制作
Blender体积雾
01安装虚拟机
虚幻材质编辑器基础——如何连接一个最基本的材质
随机推荐
Unreal material editor foundation - how to connect a basic material
This article takes you to learn in detail what is fiber to home FTTH
Nonlinear optimization: establishment of slam model
[Fantasy 4] the transformation from U3D to UE4
Windows环境MySQL8忘记密码文件解决方案
转换YV12到RGB565图像转换,附YUV转RGB测试
pytest--之测试报告allure配置
flume 190 INSTALL
Blender model import UE, collision settings
[pit avoidance guide] pit encountered by unity3d project when accessing Tencent bugly tool
Ks009 implement pet management system based on SSH
Vscode auto format
13. Semaphore critical zone protection
合并有序数列
Determine whether there are duplicate elements in the array
Blender ocean production
【Unity3D】制作进度条——让Image同时具有Filled和Sliced的功能
[tutorial] how to make the Helpviewer help document of VisualStudio run independently
AutoCAD - layer Linetype
SPSS做Shapiro-Wilk正态分析