I’ve been challenged to start the #100DayCodeChallenge, and guess what?! Challenge Accepted!! So for the next 100 days, I’ll be sharing my knowledge, learning, and experiences.
I’ll now be updating regularly from today. If you’re up for it, join me on this adventure!
I’m going to talk today about “setTimeout” and “setInterval” functions in JavaScript
“setTimeout” allows us to delay the execution of a function for a specific time. For example, it’s useful when showing a notification after a user performs an action like clicking a button.
whereas “setInterval” allows us to repeatedly call a function at specified intervals. It can come in handy for updating content regularly on a webpage.
Both functions operate asynchronously (they don’t block the execution of the rest of the JavaScript code).