JSFiddle - React, Tailwind, and code Playground
by tonyleeper
JavaScript
function foo() {
console.log('foo');
}
function bar() {
console.log('bar');
}
function foo2() {
console.log('foo2');
}
function bar2() {
console.log('bar2');
}
var hashmap = {};
hashmap[foo] = bar;
hashmap[foo2] = bar2;
hashmap[foo]();
hashmap[foo2]();
console.log(hashmap);