I'd rather avoid plain objects and in operator. They have weird behavior where there's prototype inheritance involved. Map type and of operator are safer.
Full-Stack Software Engineer; using a background in Acting and Voice-Over to pursue a lifelong love of software and technology from an arts and humanities perspective.
I'd rather avoid plain objects and
in
operator. They have weird behavior where there's prototype inheritance involved.Map
type andof
operator are safer.Totally valid point! I usually use Map and Set types in my own work as well.