0

For example we have code like this :

        setInterval(function () { // Content value
        counttime.value = "10000";
    }, 2000);

we need it , when server accept our request we dont want to send this command , before server acception i need example about that

Dani
  • 33
  • 1
  • 6
  • Sounds like you're looking for `clearInterval`. – SLaks Dec 15 '17 at 15:20
  • i'd strongly recommend to use an **asynchronous function** instead of an setInterval to wait for the server to respond. – David Dec 15 '17 at 15:22
  • @tipsfedora do you have any sample ? – Dani Dec 15 '17 at 15:26
  • quite difficult to understand as a a beginner, but here it's explained quite good: https://stackoverflow.com/questions/6898779/how-to-write-asynchronous-functions-for-node-js – David Dec 15 '17 at 15:29

0 Answers0