Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any?



Explain the working of timers in JavaScript? Also elucidate the drawbacks of using the timer, if any..

Answer / Subhankar Dey

JavaScript timers are functions that execute after a specified delay or at regular intervals. The most common timers are setInterval() and setTimeout(). Timers are useful for creating animations, repeated tasks, and AJAX requests. However, excessive use of timers can lead to performance issues, as they may cause the browser to consume more CPU resources.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

Is javascript a security risk?

1 Answers  


What are the ways of making comments in javascript?

1 Answers  


What is use of settimeout function in javascript?

1 Answers  


What is the use of ‘debugger’ keyword in javascript code?

1 Answers  


What are the different functional component in javascript?

1 Answers  


What do you understand by this keyword in javascript?

1 Answers  


What is the use of a map object in javascript?

1 Answers  


What is null in programming?

1 Answers  


How much do javascript programmers make?

1 Answers  


What javascript method would convert the string “20” to an integer (on the fly) so “20” + 20 = 40?

1 Answers  


What is ‘this’ keyword in JavaScript?

1 Answers  


Why typeof null is object?

1 Answers  


Categories