JSFiddle - React, Tailwind, and code Playground
by Elijah Manor
HTML
<script src="http://fbug.googlecode.com/svn/lite/branches/firebug1.4/content/firebug-lite-dev.js"></script>
JavaScript
var iAmGlobal = "Keep these to a minimum";
iAmGlobalToo = "Bad";
function oldSchoolWay() {
iAmGlobalNooo = "Really Bad"; //Put in global scope when executed
console.log( "Bad oldSchoolWay Function" );
}
//Bad way to prevent namespace clashing
function namespace_oldSchoolWay() {
console.log( "Worse oldSchoolWay Function" );
}
//Functions
window.oldSchoolWay();
window.namespace_oldSchoolWay();
//Global variables are available off window object
console.log( window.iAmGlobal );
console.log( window.iAmGlobalToo );
console.log( window.iAmGlobalNooo );