title: Wait 5 seconds before executing next line
body: <p>This function below doesn’t work like I want it to; being a JS novice I can’t figure out why.</p>
  
  <p>I need it to wait 5 seconds before checking whether the <code>newState</code> is <code>-1</code>.</p>
  
  <p>Currently, it doesn’t wait, it just checks straight away.</p>
  
  <pre><code>function stateChange(newState) {
    setTimeout('', 5000);
  
    if(newState == -1) {
      alert('VIDEO HAS STOPPED');
    }
  }
  </code></pre>