5 ms·
Pedantically, while _everything_ is an object is true for Python it’s not for JavaScript which has distinct primitive types for strings, numbers, booleans, symb
by laurencerowe 3y ago
Pedantically, while _everything_ is an object is true for Python it’s not for JavaScript which has distinct primitive types for strings, numbers, booleans, symbols, and undefined.
- jholman 3y agoAnd null. I know that typeof(null) says 'object', but it's lying. When I say "it's lying", I mean that according to the spec, null is of type null. Also it has absolutely nothing in common with objects except for the output of typeof. Also these days there's BigInt.
- baq 3y agoJS is amazing. As in, it’s amazing that anything actually works given the internal inconsistencies in its core. (Disclaimer: I code ts/js for a living.)