== operator or the
=== operator. You can compare for inequality with the
!= operators use abstract comparison. What this means is that if you are comparing two variables of different types, it converts one of them to be the same type as the other one and then does the comparison. Take the following example:
console.log(1 == '1');
console.log(1 === '1');
Follow along by forking this StackBlitz.
If you'd like to read more about comparison operators, check out this blog post.