I’ve also been guilty of: if (xxx === void 0)
This is slightly better than saying “undefined”, since that’s not actually a reserved word. I believe that all of these should perform the same. We should pick one based on what looks nicest and what has the most clear semantics. -Filip > On Nov 30, 2015, at 11:37 AM, Darin Adler <da...@apple.com> wrote: > > 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 > _______________________________________________ > webkit-dev mailing list > webkit-dev@lists.webkit.org > https://lists.webkit.org/mailman/listinfo/webkit-dev _______________________________________________ webkit-dev mailing list webkit-dev@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-dev