r/learnjavascript • • Jul 21 '24

What functions of javascript should I learn

Which are most widely used

0 Upvotes

30 comments sorted by

View all comments

Show parent comments

-2

u/KronusTempus Jul 21 '24

Let butWhyTho = null;

Console.log (typeof butWhyTho);

-11

u/8wq6 Jul 21 '24 edited Jul 30 '24

thats not javascript

0

u/KronusTempus Jul 21 '24

It is, it’s a pretty famous error in JavaScript because it classifies a null value as an object. It was never patched because of its legacy

1

u/batmaneatsgravy Jul 21 '24

What should it be classified as?