Skip to content

Instantly share code, notes, and snippets.

@lidlanca

lidlanca/main.js Secret

Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lidlanca/4c36f79e335ca623362e to your computer and use it in GitHub Desktop.
Save lidlanca/4c36f79e335ca623362e to your computer and use it in GitHub Desktop.
Multifile Gist - Dummy

#This is a readme file

The repository you are reading contains two files (excluding this file)

  • main.js
  • sub.js
//This is the main file
//main.js
var self = "main.js"
console.log ("Who am I?", self);
if (self !="main.js"){
console.log("I am not who I suppose to be");
self = "main.js";
}
$(document).ready ( function (){
console.log("I am ready");
});
//This is the sub file
//sub.js
var self = "sub.js"
console.log ("Who am I?", self);
if (self !="sub.js"){
console.log("I am not who I suppose to be");
self.destroy();
}
console.log("Lets count to 10");
console.log("1");
console.log("10");
$(document).ready ( function (){
console.log("I am ready");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment