Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | glr01 |
It’s pretty much that. I’d like to know if there’s a way to create a dictionary with a function as value, similar to what Javascript does with objects:
const obj = {
key: () => {
...
}
}
If not, is there any workaround?