Created
April 18, 2017 07:26
-
-
Save anonymous/5450359829a94d5d1df72b3508ee09a8 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