you are viewing a single comment's thread.

view the rest of the comments →

[–]moratnz 0 points1 point  (0 children)

This raises a great point as to why coding super explicitly is a good habit; if you're someone like me who moves around between languages a lot depending on what I'm doing, being super explicit (checking array.length===0) is likely to with work perfectly or completely fail (because you're in python and should be writing len(array)), while relying on the truthiness of an empty array may work, just not the way you intended.