-
Today's JavaScript that I'm not sure if I like that it works or not: const message = { type: "info", info: 42 } const { type, [type]: payload } = message Now "type" and "payload" are destructured into variables, but it doesn't sit right.
-
And “payload” is 42