Isn't it tricky?
My understanding:
null == undefined
null != 0
null != ""
0 == ""
0 == false
"" == false
so "if (x)..." will be false for x = 0, "", null, or undefined
and "if (x==null)" will only be true for null or undefined, not 0 or ""
On Thu, Sep 19, 2013 at 8:05 AM, Angel Herráez <angel.herr...@uah.es> wrote:
> > I took the opportunity to get rid of references to "undefined" ---
> > let me know if you think I'm in error there.
>
> Sorry, I cannot say. I have no authority on these things. And the &&
> syntax confuses me.
>
> All I have previously read about these things is to use "typeof" and
> to use strict equality, that is === or !==
>
> I would guess that the value may indeed be undefined if the variable
> has not been declared and (maybe) null or undefined? if it was
> initialized without a value.
> All these variables are indeed defined in Jmol2.js, are they not?
> Then.... I got lost :(
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
> 1,500+ hours of tutorials including VisualStudio 2012, Windows 8,
> SharePoint
> 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack
> includes
> Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
> http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13.
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers