DEV Community

Discussion on: Is everything in JavaScript an Object?

Collapse
 
baenencalin profile image
Calin Baenen

What I'm saying in most languages, like C, Go, C++, etc..
Everything except arrays and numbers are objects.

(I guess this isn't necessarily true for JS.)

Thread Thread
 
mayankav profile image
mayankav

@baenencalin Hey man! I get you now. I am not sure about all the other languages but what I can say is that its indeed a choice made by the langauge itself. I mean how a langauge defines primitives and objects is completely upto the language. We do have an article of faith on the universal notion though.

Thread Thread
 
baenencalin profile image
Calin Baenen

I thought primitives did have a definite definition ("The least abstract(ed) type in a given language. - Usually that who's implementation is the most bare-bones (compared to other types) when looking at the source code for a given language.")?