# == and === confusion

**URL:** <https://discourse.nodered.org/t/and-confusion/3642>\
**Category:** General\
**Created:** [2 October 2018 23:42 UTC](https://discourse.nodered.org/t/and-confusion/3642 "2018-10-02T23:42:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [2 October 2018 23:54 UTC](https://discourse.nodered.org/t/and-confusion/3642/2 "2018-10-02T23:54:22Z")

</div>

This is a good summary of the differences: [https://stackoverflow.com/a/359509/2117239](https://stackoverflow.com/a/359509/2117239)

In short, === is a strict type and value test. In your code, that means the Active property must be a Number type and must have the value 0.

The == comparison doesn't do strict type checking. So it will accept a much wider set of values. For example: `"0"==0`. But also `false==0` and other possibly unexpected results. This is why you get a warning.

So the real question is what exactly is the value _and_ type of the `msg.payload[i].Active` property. If you pass it to the debug sidebar, it should give you hint you need.

---

_[View the full topic](https://discourse.nodered.org/t/and-confusion/3642)._
