Skip to content

Instantly share code, notes, and snippets.

@AliceWonderland
Forked from anonymous/7.4 Times Tables.js
Created April 18, 2017 07:26
Show Gist options
  • Save AliceWonderland/ff0b84f0282ed5cf0dbddfec19f2c47f to your computer and use it in GitHub Desktop.
Save AliceWonderland/ff0b84f0282ed5cf0dbddfec19f2c47f to your computer and use it in GitHub Desktop.
7.4 Times Tables created by smillaraaq - https://repl.it/HHmm/6
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