If you thought that in Perl there are too many ways to do it, run this with ES6 enabled:
const bla = () => { console.log("ran bla") }; const gar = () => { console.log("ran gar") }; function asdf () { console.log("ran asdf"); } const xxx = { bla, gar, asdf }; console.log(xxx);
for the impatient, this is the output
{ bla: [Function], gar: [Function], asdf: [Function: asdf] }
I did not expect that.