search
LoginSignup
3
Help us understand the problem. What are the problem?

More than 3 years have passed since last update.

株式会社ビットエー Advent Calendar 2017 Day 8

posted at

JavaScript typeofチートシート

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

参考文献

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
What you can do with signing up
3
Help us understand the problem. What are the problem?