function delay(n) {
return new Promise(resolve => setTimeout(resolve, n))
}
the return statement in this function is a little difficult to understand.
resolve => setTimeout(resolve, n)
= > is this an arrow function?
if yes, resolve is the parameter of setTimeout,
delay function takes an argument n, and this setTimeout function introduces a new parameter.
it"s a little confusing. Please explain.