adobe-webplatform / eve

Custom events…
http://dmitry.baranovskiy.com/eve/
Apache License 2.0
316 stars 111 forks source link

line240-243 why write like that #23

Closed screepinail closed 9 years ago

screepinail commented 9 years ago
    return function (zIndex) {
        if (+zIndex == +zIndex) {
            f.zIndex = +zIndex;
        }
    };

I'm curious about why did U write like that? Isn't the condition ‘if’ always be true?

DmitryBaranovskiy commented 9 years ago

Check what it will be for zIndex = undefined or "blah" or {}