jkap

CEO of posting

butch jewish dyke
part of @staff, cohost user #1
married to @kadybat

This user can say it
osu stats


🐘 mastodon
xoxo.zone/@jkap
🖼️ icon credit
twitter.com/osmoru
🐦 twitter
not anymore lol

// man come on
typeof null === "object";
syntax highlighting by codehost

i keep forgetting about this one. fortunately there's nothing loadbearing that relies on this type of check but man come on


You must log in to comment.

in reply to @jkap's post:

Wew, I think they mean bigint. Also, of course:

> 10n instanceof Number
false

BigInts aren't numbers, because a number, as u know, is a 64-bit Float only and nothing else, meowf.

typeof always returns the primitive type of a value. the reason Array.isArray is a thing is because arrays are objects and not a primitive type. Array.isArray(a) is basically equivalent to a instanceof Array (except it also returns true for arrays from other frames which are an instance of that frame's Array object, not yours (iirc))

Trying to think of any situation where null not being its own separate type is helpful, meowf. Teh only ones I can think of are specific conveniences in statically typed languages, which don'f apply to javascript...

U can't type infer null in java, so maybe they just copied c's void* instead (even tho even c now has a separate type fur its nullptr now in c23, nullptr_t)