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 3 years have passed since last update.

[Javascript]変数、定数

Posted at

#変数定義
let 変数名 = 値;

let name = "tanaka";

##変数の出力

let name = "tanaka";

console.log(name);

###変数の値の更新
letをつけずに定義する。

let name = "tanaka";
console.log(name);

name = "satou";
console.log(name);

#定数定義
定数は値の上書きができない。
const 定数名 = 値;

const name = "tanaka"

#まとめ
いわゆる変数を定義する時
値が変わる
let 変数名 = 値;

値が変わらない
const 定数名 = 値;

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?