# Three equal comparison

**URL:** <https://forum.code.org/t/three-equal-comparison/14441>\
**Category:** Unit and Lesson Discussion\
**Tags:** csp-unit-5, csp-unit-5-lesson-5\
**Created:** [February 15, 2018, 5:58pm UTC](https://forum.code.org/t/three-equal-comparison/14441 "2018-02-15T17:58:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mitch](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/mitch/32/2678_2.png) [@Mitch](https://forum.code.org/u/Mitch)\
**Post date:** [February 15, 2018, 5:58pm UTC](https://forum.code.org/t/three-equal-comparison/14441/1 "2018-02-15T17:58:41Z")

</div>

I have looked up the difference between using == and === for comparison in JavaScript and it makes sense.  
Some of my students have been asking about why App Lap is forcing them to use three equal signs when comparing any integers against 0. Both operands are integers so no type conversion is necessary.

for example :

var count = 0;  
// some code here  
if (count == 0)  
{  
console.log(“zero”);  
}

App Lab warns **Use ‘===’ to compare with ‘0’;**

Does anybody know why only a comparison with 0 generates this error?

---

<div class="post-metadata">

**Author:** ![bhatnagars](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/bhatnagars/32/4919_2.png) [@bhatnagars](https://forum.code.org/u/bhatnagars)\
**Post date:** [February 15, 2018, 7:50pm UTC](https://forum.code.org/t/three-equal-comparison/14441/2 "2018-02-15T19:50:26Z")

</div>

Here is a discussion thread about this topic. Hopefully, this will answer your question. [http://forum.code.org/t/unit-5-stage-8/6533/3?u=bhatnagars](http://forum.code.org/t/unit-5-stage-8/6533/3?u=bhatnagars)
