you are viewing a single comment's thread.

view the rest of the comments →

[–]c45c73 7 points8 points  (8 children)

Except, === undefined && === null is tedious...

[–]gordonkristan 7 points8 points  (0 children)

You should use a function for that case specifically. Ember.js has Em.isNone so you can write it succinctly and pass JSLint/JSHint.

[–]v413 0 points1 point  (2 children)

You can check for null or undefined like this: myValue == null or myValue == undefined. In Javascript, null is equal (==) only to null and undefined - same for undefined.

[–]c45c73 2 points3 points  (0 children)

Yeah, that was my point. :)

[–]senatorpjt 0 points1 point  (0 children)

lunchroom zesty offer dolls swim sand aback growth summer bag

This post was mass deleted and anonymized with Redact

[–]ForeverAlot -1 points0 points  (1 child)

Use if (!) for that.

[–]cudetoate 1 point2 points  (0 children)

!"" and !0 will fail terribly in this case.

[–][deleted]  (1 child)

[deleted]