| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ja/docs/Web/JavaScript/Guide/Data_structures | [Back] [Original] |
Get to know MDN better
let foo = 42; // foo
foo = "bar"; // foo
foo = true; // foo
const foo = 42; // foo
const result = foo + "1"; // JavaScript foo
console.log(result); // 421
null typeof typeof null "object" null === null
null undefined Number toExponential() JavaScript null undefined TypeError
typeof |
||
|---|---|---|
| Null | "object" |
|
| Undefined | "undefined" |
|
"boolean" |
Boolean |
|
"number" |
Number |
|
"bigint" |
BigInt |
|
"string" |
String |
|
"symbol" |
Symbol |
Null null 1
Undefined undefined 1
undefined null typeof null === "object" undefined
return (return;) undefined obj.iDontExist) undefined let x;) undefined Array.prototype.find() Map.prototype.get() undefined null Object.getPrototypeOf()Object.create() undefined null
(Boolean) true false 2
(Number) IEEE 754 2-1074 (Number.MIN_VALUE) 21023 (2 - 2-52) (Number.MAX_VALUE) -(253 1) (Number.MIN_SAFE_INTEGER) 253 1 (Number.MAX_SAFE_INTEGER) JavaScript Number.isSafeInteger()
Number.MAX_VALUE Infinity Number.MIN_VALUE 0 Number.MAX_VALUE -Infinity Number.MIN_VALUE -0 Infinity -Infinity Number.POSITIVE_INFINITY Number.NEGATIVE_INFINITY
10 -0 +0 0 +0 +0 === -0 true
console.log(42 / +0); // Infinity
console.log(42 / -0); // -Infinity
NaN ("Nnot a Number") JavaScript
(BigInt) JavaScript (Number.MAX_SAFE_INTEGER)
n BigInt()
//
const x = BigInt(Number.MAX_SAFE_INTEGER); // 9007199254740991n
x + 1n === x + 2n; // false9007199254740992n 9007199254740993n
//
Number.MAX_SAFE_INTEGER + 1 === Number.MAX_SAFE_INTEGER + 2; // true 9007199254740992
+, *, -, **, % >>>
(String) UTF-16 16 0 1 length UTF-16 Unicode String
JavaScript
substring() +) concat() JavaScript
(Symbol)
2 JavaScript Object.defineProperty() Object.getOwnPropertyDescriptor() Object.defineProperty()
valueget JavaScript
writableenumerableconfigurable 1 2 (get set)
: JavaScript
null [[Prototype]] [[Prototype]]
JavaScript API 2 Date Temporal Date
Array.prototype indexOf() () push() ()
Int8ArrayFloat32Array ArrayBuffer DataView
Map Set < "less than" WeakMap
DOM data-* Map WeakMap
JSON (JavaScript Object Notation) JavaScript JSON JSON
[Symbol.toPrimitive]() "default" valueOf()toString() toString() valueOf()
[Symbol.toPrimitive]() TypeError valueOf() toString() TypeError
console.log({} + []); // "[object Object]"
{} [] [Symbol.toPrimitive]() {} [] valueOf() Object.prototype.valueOf toString() {}.toString() "[object Object]" [].toString() "" "[object Object]"
[Symbol.toPrimitive]() valueOf() [Symbol.toPrimitive]() Date Symbol [Symbol.toPrimitive]() Date.prototype[Symbol.toPrimitive]() "default" "string" Symbol. prototype[Symbol.toPrimitive]()
3
[Symbol.toPrimitive]("default") valueOf() toString()[Symbol.toPrimitive]("number") valueOf() toString()[Symbol.toPrimitive]("string") toString() valueOf()[Symbol.toPrimitive]() valueOf toString
| Web Proxy Viewer | New URL | Original Page |