For both primitives and objects there are sub-types, let's expand our vision a little more:
There is no specific reason in the order for JS, I just order it that way because is the way I use to remember all of them: BUSN (boolean, bigint, undefined, string, symbol, null, number)
Functions like arrays are a special kind of object (sub-types).
As I mention before functions are special kind of object. In this particular case function is a shorthand response; at the end of the day, the Function constructor is derived from Object constructor.
The case of the null, well this is a little tricky one... I'm going to let that homework for you.
- There are 2 main value types in JS: primitives and objects.
- There are 9 sub-types: (BUSN) boolean, bigint, undefined, string, symbols, numbers, null, objects and functions.
The latest ECMAScript standard defines nine types.
That's All Folks, hope you learn and enjoy it.