flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
Subject Re: [FlexJS] more on undefined / non initialised values
Date Fri, 09 Jun 2017 22:38:28 GMT
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

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


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

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

View raw message