the murmurous sea

(Q)Is null a primitive data type in JS? 본문

#dev/undone Q

(Q)Is null a primitive data type in JS?

lunacer 2020. 6. 3. 13:19

About null.

https://developer.mozilla.org/en-US/docs/Glossary/Primitive

 

Primitive

In JavaScript, a primitive (primitive value, primitive data type) is data that is not an object and has no methods. There are 6 primitive data types: string, number, bigint, boolean, undefined, and symbol. There also is null, which is seemingly primitive

developer.mozilla.org

"There also is null, which is seemingly primitive, but indeed is a special case for every Object: and any structured type is derived from null by the Prototype Chain."

 

but I saw many people count null as one of the primitive data. include Traversy media. 
https://www.youtube.com/watch?v=hdI2bqOjy3c&list=PLillGF-RfqbbnEGy3ROiLWk7JMCuSyQtX&index=1

'#dev > undone Q' 카테고리의 다른 글

async vs. fetch  (0) 2020.06.25
RegExp  (0) 2020.06.24
JS ES6: Promise vs. Async await  (0) 2020.06.15
JS ES5: strict / non-strict(sloppy) mode  (0) 2020.06.10
JS OOP:  (0) 2020.06.09
Comments