-
-
Save AliceWonderland/ff0b84f0282ed5cf0dbddfec19f2c47f to your computer and use it in GitHub Desktop.
7.4 Times Tables created by smillaraaq - https://repl.it/HHmm/6
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 timesTable(num){ | |
var timesTableNum=num; | |
return function(num){ | |
return num*timesTableNum; | |
} | |
} | |
// var ninesTable = timesTable(9); | |
// ninesTable(8) // => 72 | |
var twelvesTable = timesTable(12); | |
twelvesTable(100) // => 1200 | |
//timesTable(9)(8); //<=== same thing as lines 10-11 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment