Thanks for pointing it was == and not ===, but I must still be missing
something.  If a variable is of type Boolean in AS (not JS), is there a
difference between these three patterns:

If (b)
If (b == true)
If (b === true)

Or these three?

If (!b)
If (b == false)
If (b === false)

I don't think there is, and so for me, I would rather not have the output
JS initialize b to false and would rather have the compiler catch were I
wrote anything other than (b) or (!b).  I'd happily replace them and save
code.

But again, I don't think we have to agree.  The compiler can be taught to
respond to options to initialize everything as well detect unnecessary
code.

Thanks,
-Alex

On 6/8/17, 3:40 PM, "Justin Mclean" <jus...@classsoftware.com> wrote:

>HI,
>
>> Oh. One sec. I actually just tried it in JS and I see that undefined !=
>>false. That’s weird.
>
>Yep that’s the issue.
>
>Thanks,
>Justin

Reply via email to