clearTimeout
clearTimeout
setTimeout returns an ID for the scheduled work. clearTimeout uses that ID to cancel the callback before it runs.
That model matters for autosave, undo, and delayed notifications where the scheduled update may no longer be true.
Your task: Schedule the autosave status to become Saved, then cancel that scheduled update and show Autosave canceled instead.
Free with a JS Exercises account
Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.
By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.
clearTimeout
setTimeout returns an ID for the scheduled work. clearTimeout uses that ID to cancel the callback before it runs.
That model matters for autosave, undo, and delayed notifications where the scheduled update may no longer be true.
Your task: Schedule the autosave status to become Saved, then cancel that scheduled update and show Autosave canceled instead.