Skip to content

Instantly share code, notes, and snippets.

@pageii
Created October 25, 2016 07:01
Show Gist options
  • Save pageii/50fa2d9a3535824373d045abde28c05a to your computer and use it in GitHub Desktop.
Save pageii/50fa2d9a3535824373d045abde28c05a to your computer and use it in GitHub Desktop.
null created by pageii - https://repl.it/EFP1/0
var job = false, // may this come true
cash = true, // any savings?
passionate = true, // loves what you do?
knowledgable = false; // knows your stuff well?
var action = function(){
if (job) { // found a job yet?
console.log("Phew. That was close.");
return;
}
while (!job) {
switch(true) {
case (passionate && knowledgable && cash):
console.log("Consider contracting.");
break;
case (!passionate && !knowledgable):
console.log("Want to explore other career options?");
break;
case (!cash): // running out of savings
console.log("Find a job, any jobs, quickly.");
break;
case (!passionate):
console.log("You are probably burnt out. Take a breather!");
//to become ...
passionate = true;
action(); // recursive
break;
case (!knowledgable):
console.log("Learn as you go.");
//to become ...
knowledgable = true;
action(); // recursive
break;
default:
console.log("Just don't give up yet!");
}
return null; // "null" more problems.
}
}
action();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment