JavaScript Comparisons

01.10.2015

The triple-equals === compares both type AND contents.

The double-equals == tries to help with type coercion.

For this reason, it’s best practice to always use triple-equals to avoid unexpected results.

The instanceof checks the type of object. It moves up the entire inheritance chain.