setInterval() メソッドは Window および Worker メソッドで提供され、一定の遅延間隔を置いて関数やコードスニペットを繰り返し呼び出します。 このメソッド、インターバルを一意に識別するインターバル ID を返します。よって clearInterval() を呼び出して、後でインターバルを削除できます。 setInterval(code) setInterval(code, delay) setInterval(func) setInterval(func, delay) setInterval(func, delay, arg0) setInterval(func, delay, arg0, arg1) setInterval(func, delay, arg0, arg1, /* … ,*/ argN) func delay ミリ秒が経過するたびに実行する関数です