<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Web Development</title>
	<atom:link href="http://webinsight.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://webinsight.wordpress.com</link>
	<description>Sharing experiences in web-development</description>
	<lastBuildDate>Thu, 05 Jan 2012 08:26:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='webinsight.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Web Development</title>
		<link>http://webinsight.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://webinsight.wordpress.com/osd.xml" title="Web Development" />
	<atom:link rel='hub' href='http://webinsight.wordpress.com/?pushpress=hub'/>
		<item>
		<title>JavaScript: &#8216;var&#8217; keyword and scope</title>
		<link>http://webinsight.wordpress.com/2009/03/22/javascript-var-keyword-and-scope/</link>
		<comments>http://webinsight.wordpress.com/2009/03/22/javascript-var-keyword-and-scope/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 16:44:48 +0000</pubDate>
		<dc:creator>bvamsidhar</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://webinsight.wordpress.com/?p=42</guid>
		<description><![CDATA[One fact that many JavaScript developers don&#8217;t realize is that there are only two levels of scope in JavaScript &#8211; the global scope and the function scope. Usually we find code like: function doSomething(){ &#160;&#160;&#160;&#160;a = 1; } Here we are not defining a variable called &#8216;a&#8217; we are just assigning a value to a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webinsight.wordpress.com&amp;blog=760424&amp;post=42&amp;subd=webinsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One fact that many JavaScript developers don&#8217;t realize is that there are only two levels of scope in JavaScript &#8211; the global scope and the function scope. Usually we find code like:<br />
<code><br />
function doSomething(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;a = 1;<br />
}<br />
</code><br />
Here we are not defining a variable called &#8216;a&#8217; we are just assigning a value to a global variable with the same name. Such statements inside function scope should be avoided for simple reason that global variables result in complicated data flow. The right way to do is:<br />
<code><br />
function doSomething(){<br />
&nbsp;&nbsp;&nbsp;&nbsp;var a = 1;<br />
}<br />
</code><br />
The point is that although JavaScript is not strict about variable declaration, &#8216;a=1&#8242; is not a convenient alternative for &#8216;var a=1&#8242;.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/webinsight.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/webinsight.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/webinsight.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/webinsight.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/webinsight.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/webinsight.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/webinsight.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/webinsight.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=webinsight.wordpress.com&amp;blog=760424&amp;post=42&amp;subd=webinsight&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://webinsight.wordpress.com/2009/03/22/javascript-var-keyword-and-scope/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/cd1b5928c70a0f60fff43d9c0bbdc2f9?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">bvamsidhar</media:title>
		</media:content>
	</item>
	</channel>
</rss>
