Re:Deep Cloning Objects in JavaScript, the Modern Way
by laurencerowe on Thursday December 21, 2023 @09:01PM
(#38730016)
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.
[ Parent
| on HN ]
Re:Deep Cloning Objects in JavaScript, the Modern Way
by jholman on Thursday December 21, 2023 @10:22PM
(#38730607)
And 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.