LoginSignup
0
0

More than 1 year has passed since last update.

javascript09 Nullとundefined

Last updated at Posted at 2022-02-18

Nullの値は1つしかない、nullです。
nullとは存在しない意味です。

var a = null;
console.log(typeof a);
返された結果はObject.

undefinedの値はundefinedしかない。
変数を宣言したけど、値を代入してない場合、値はundefinedとなります。

var b = undefined;
console.log(typeof b);

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