Created
March 9, 2016 16:46
-
-
Save wmantly/c6b50e424bed7171b7c3 to your computer and use it in GitHub Desktop.
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
| toDom = { | |
| fun1: function(){ | |
| // code | |
| }, | |
| fun2: function(){ | |
| // code | |
| }, | |
| fun3: function(){ | |
| // code | |
| } | |
| }; | |
| //then you can call it with a variable like so | |
| var thingToDO = fun2 | |
| toDom[ThingToDo]() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment