includes vs indexOf Playground

Sri walks the train looking for x: indexOf and includes compare in different ways. See what each says about NaN, -0, holes in the train and wagon 0. An…

The key idea

indexOf uses ===, includes uses SameValueZero

Try it in this playground