Skip to content

Instantly share code, notes, and snippets.

@chrislaughlin
Created August 8, 2014 07:55
Show Gist options
  • Save chrislaughlin/a7ef82e4f4ebf1e857a4 to your computer and use it in GitHub Desktop.
Save chrislaughlin/a7ef82e4f4ebf1e857a4 to your computer and use it in GitHub Desktop.
Math print
function MathPrint() {
var x = 10;
var y = 100;
var multiply = function(a, b) {
return a * b;
};
var printToConsole = function (text) {
console.log(text);
};
var printAndMultiplyAfterWait = function () {
setTimeout(function() {
multiply(x,y);
},2000);
}
return {
multiply:multiply,
printToConsole:printToConsole,
printAndMultiplyAfterWait: printAndMultiplyAfterWait
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment