Agreed. I appreciate what the author is trying to do, but a quick glance has already shown me a few mistakes. For instance, null is an object, while in concept it is a primitive, it can create some ambiguity in the definition. Types are weird in js... For the most part, there is string, number, boolean, undefined, and object. Even functions are technically objects, but they do return back function type for typeof. I find it extremely confusing as to the level of differences between actual types and what we perceive them as, even as someone who has read into this a great deal.
6
u/pxldgn Oct 01 '20
This chart is wrong on many levels
While NaN is a primitive value, it is a member of Number (as all the other numbers). What the author would like to write here is "Primitive Types" instead of "Primitives", and NaN definitely does not belong there.
https://www.ecma-international.org/ecma-262/11.0/index.html#sec-primitive-value
JSON is not a "data structure" whatever the author means by that, JSON is an object. That's all. There is such a thing like "Structured Data" (containing the JSON object), but that is a completely different thing:
https://www.ecma-international.org/ecma-262/11.0/index.html#sec-structured-data
Please don't share this chart, this is just simply ridiculous.