LoginSignup
1
1

More than 5 years have passed since last update.

【JavaScript 】定数と変数

Posted at

定数と変数

基本constを使う。
再代入が必要なものだけletを使う。

'use strict';

// 定数
const c = 100;
console.log(c); // 100

// 変数
let l = 200;
l = 300;
console.log(l); // 300

※Google Chrome で確認
※ES8

1
1
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
1