指定 x 毫秒后调用函数。

setTimeout(function() {
    alert("42")
  }, 3000) // 3秒后运行