LoginSignup
5
2

More than 5 years have passed since last update.

JavaScript typeofチートシート

Posted at
返り値 コメント
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" クラスは関数である

参考文献

5
2
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
5
2