On 8/20/15 2:43 PM, Timon Gehr wrote:
On 08/20/2015 07:50 PM, Steven Schveighoffer wrote:

Very true. Not much we can do about it. For now, the best thing to do is
always compare arrays to null instead of simply if(arr):

if(arr != null)

Alternatively, but a little more ugly, is to check the length:

if(arr.length)

Isn't the best way to compare to []?

if(arr!=[])

I think comparing to null is needlessly confusing.

Same thing. [] is null.

-Steve

Reply via email to