We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
写一个 execTime 函数,要求
execTime
t
callback
function execTime(t, callback) { // some code } console.log(1) execTime(3000, function(){ console.log(3) }) console.log(2)
The text was updated successfully, but these errors were encountered:
简单使用setTimeout即可
function execTime(t, callback) { setTimeout(callback,t) } console.log(1) console.time('test') execTime(3000, function(){ console.timeEnd('test') console.log(3) }) console.log(2)
Sorry, something went wrong.
No branches or pull requests
写一个
execTime
函数,要求t
:时间毫秒数callback
:回调函数The text was updated successfully, but these errors were encountered: