式 | 返り値 | コメント |
---|---|---|
typeof 'hello' |
"string" |
|
typeof 123 |
"number" |
|
typeof true |
"boolean" |
|
typeof Symbol() |
"symbol" |
|
typeof undefined |
"undefined" |
|
typeof null |
"object" |
注意! |
typeof { a: 'apple' } |
"object" |
|
typeof new Date() |
"object" |
|
typeof [1, 2, 3] |
"object" |
配列はオブジェクトである |
typeof /[0-9]/ |
"object" |
正規表現はオブジェクトである |
typeof function() {} |
"function" |
|
typeof Array |
"function" |
コンストラクタは関数である |
typeof class {} |
"function" |
クラスは関数である |
More than 5 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme