title: how do you do something after a certain time has passed?
body: <p>i'm trying to make an alarm in JS where i get the value of an input and Multiply it by 1000 to get the ms value and setTimeout a function which changes a paragraph element to become Time Up, the time in the setTimeout is the value of the input x 1000 (because miliseconds) Somewhat like this:</p>
  <pre class="lang-js prettyprint-override"><code>function domChanger() {
    document.getElementById(&quot;paragraph&quot;).innerHTML = &quot;Time Up&quot;;
  }
  function time(alert) {
    alert = document.getElementById(&quot;input&quot;)
    alert.value *= 1000;
    setTimeout(domChanger(), alert.value)
  
  }
  </code></pre>
  <p>instead of doing the expected for me (doing the function after the time set by alert.value * 1000 has passed) it instantly outputs Time Up. am I misunderstanding anything? because I searched on Google for like 1 hour and I couldn't find anything aside from setTimeout and setInterval.</p>