Created
August 8, 2014 07:55
-
-
Save chrislaughlin/a7ef82e4f4ebf1e857a4 to your computer and use it in GitHub Desktop.
Math print
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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