1
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 1 year has passed since last update.

【現時刻を表示する toLocaleTimeString()】

1
Posted at

toLocaleTimeString() は、JavaScript の Date オブジェクトで使われるメソッドで、現在の時刻を ローカルのタイムフォーマット に変換してくれるもの。
簡単に言うと、「その環境の設定に応じた時刻の文字列」を取得できる。

記述例

const now = new Date();
console.log(now.toLocaleTimeString()); // 例: "14:54:03"
1
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
1
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?