It is beacause setTimeout doesnt guarantee to executre exactly after given time... It means minimum this much time is required...to check this add a settimeout with 500ms.. And then add a for loop that takes 5 sec to eexcute...and check whether the handler in setTimeout executes first or not
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
It is beacause setTimeout doesnt guarantee to executre exactly after given time... It means minimum this much time is required...to check this add a settimeout with 500ms.. And then add a for loop that takes 5 sec to eexcute...and check whether the handler in setTimeout executes first or not