Skip to content

Instantly share code, notes, and snippets.

@wmantly
Created March 9, 2016 16:46
Show Gist options
  • Select an option

  • Save wmantly/c6b50e424bed7171b7c3 to your computer and use it in GitHub Desktop.

Select an option

Save wmantly/c6b50e424bed7171b7c3 to your computer and use it in GitHub Desktop.
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