[webkit-dev] Preferred style for checking for undefined in our built-in JavaScript code?

Darin Adler darin at apple.com
Mon Nov 30 11:37:44 PST 2015


I see the following in some code:

    if (xxx === undefined)

And I see the following in some other code:

    if (typeof xxx == “undefined”)

    or

    if (typeof xxx === “undefined”)

Is one preferred over the other, style-wise? Is one more efficient than the other?

— Darin


More information about the webkit-dev mailing list