JavaScript Namespace Example

<!DOCTYPE html>
<html>
<head>
<script>
	teamextension = {
		foo : 'Hi',

		bar : function() {
			alert(teamextension.foo);
		}
	}

	teamextension.foo = 'Hello';
	teamextension.bar();
</script>
</head>
<body>
</body>
</html>

No Comments


Leave a Reply

Your email address will not be published. Required fields are marked *