0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JavaScript: 日付や時刻を表示してみる

Last updated at Posted at 2020-02-01

時間を表示する。


'use strict';

function myTime() {
    console.log(new Date()); // 日付と時間を出力。
}

setTimeout(myTime, 1000); //  1000ミリ秒=1秒後に関数を実行する。「myTime」の後にカッコをつけると返り値を取ることになるので、カッコをつけてはいけない。これがないと表示されない。
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?