Which statement allows a developer to cancel the scheduled timed function?
Refer to the code below:
let timeFunction =() => {
console.log(‘Timer called.”);
};
let timerId = setTimeout (timedFunction, 1000);
Which statement allows a developer to cancel the scheduled timed function?
A . removeTimeout(timedFunction);
B. removeTimeout(timerId);
C. clearTimeout(timerId);
D. clearTimeout(timedFunction);
Answer: C
Latest JavaScript Developer I Practice Questions with 144 Q&As
Updated Study Material | Instant Download | Detailed Answers and Explanations
Subscribe
Login
0 Comments