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

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments