<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Logical AND (&amp;&amp;) and Logical OR (&#124;&#124;) in Javascript</title>
	<atom:link href="http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/</link>
	<description>web / programming / javascript / css / html</description>
	<lastBuildDate>Tue, 29 Jun 2010 15:30:09 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: sstchur</title>
		<link>http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/comment-page-1/#comment-469</link>
		<dc:creator>sstchur</dc:creator>
		<pubDate>Thu, 31 Jan 2008 00:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2007/02/14/logical-and-and-logical-or-in-javascript/#comment-469</guid>
		<description>Scott:

&lt;p&gt;Valid point.  I&#039;ve actually done that on one or two occasions, violating my own recommendations.&lt;/p&gt;

&lt;p&gt;In that one limited case, I think using logical AND as a shortcut is probably okay.&lt;/p&gt;

&lt;p&gt;Thanks for the suggestion.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<p>Scott:</p>
<p>Valid point.  I&#039;ve actually done that on one or two occasions, violating my own recommendations.</p>
<p>In that one limited case, I think using logical AND as a shortcut is probably okay.</p>
<p>Thanks for the suggestion.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Bockelman</title>
		<link>http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/comment-page-1/#comment-461</link>
		<dc:creator>Scott Bockelman</dc:creator>
		<pubDate>Wed, 30 Jan 2008 19:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2007/02/14/logical-and-and-logical-or-in-javascript/#comment-461</guid>
		<description>You can use the &amp;&amp; construct to avoid a chain of null checks to get the last node or last value in a chain of references.  

Consider this code:

// get the value of x.y.z
var value = x &amp;&amp; x.y &amp;&amp; x.y.z;

instead of:

var value = ( null == x ? null : ( null == x.y ? null : x.y.z ) );</description>
		<content:encoded><![CDATA[<p>You can use the &amp;&amp; construct to avoid a chain of null checks to get the last node or last value in a chain of references.  </p>
<p>Consider this code:</p>
<p>// get the value of x.y.z<br />
var value = x &amp;&amp; x.y &amp;&amp; x.y.z;</p>
<p>instead of:</p>
<p>var value = ( null == x ? null : ( null == x.y ? null : x.y.z ) );</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Idetrorce</title>
		<link>http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/comment-page-1/#comment-46</link>
		<dc:creator>Idetrorce</dc:creator>
		<pubDate>Sat, 15 Dec 2007 12:44:06 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2007/02/14/logical-and-and-logical-or-in-javascript/#comment-46</guid>
		<description>very interesting, but I don&#039;t agree with you
Idetrorce</description>
		<content:encoded><![CDATA[<p>very interesting, but I don&#039;t agree with you<br />
Idetrorce</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sstchur</title>
		<link>http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/comment-page-1/#comment-45</link>
		<dc:creator>sstchur</dc:creator>
		<pubDate>Wed, 14 Feb 2007 16:00:28 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2007/02/14/logical-and-and-logical-or-in-javascript/#comment-45</guid>
		<description>Thanks Rich!  I wasn&#039;t aware of that; it&#039;s good to know.</description>
		<content:encoded><![CDATA[<p>Thanks Rich!  I wasn&#039;t aware of that; it&#039;s good to know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: RichB</title>
		<link>http://blog.stchur.com/2007/02/14/logical-and-and-logical-or-in-javascript/comment-page-1/#comment-44</link>
		<dc:creator>RichB</dc:creator>
		<pubDate>Wed, 14 Feb 2007 09:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://stchur.com/blog2/2007/02/14/logical-and-and-logical-or-in-javascript/#comment-44</guid>
		<description>See the ?? operator in C# for a similar language feature.</description>
		<content:encoded><![CDATA[<p>See the ?? operator in C# for a similar language feature.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
