Return to Snippet

Revision: 31603
at September 9, 2010 13:36 by khaled


Initial Code
<script type="text/javascript">
	
	var MyVariable = 'global';
	
	function x()
	{
		var MyVariable = 'local';
		alert('x: ' + MyVariable);
	}
	
	function y()
	{
		alert('y: ' + MyVariable);
	}
	
	
	x();
	y();
</script>

Initial URL

                                

Initial Description

                                

Initial Title
Local & Global Variable in Javascript

Initial Tags

                                

Initial Language
JavaScript