the fact that == and .equals() both exist and == is the bad one is a fucking disgrace to every language that doesn't allow == to do sensible things. JS in particular is terrible for this - it has Object.is to do identity comparison but === also does identity comparison. and as far as I can tell typescript-eslint can't be configured to yell at you if your === is useless.
this is why I don't respect Zig or other languages that brag about not having hidden control flow. you know what hidden control flow is? it's a fucking encapsulation. and encapsulations are good.