Property Value Shorthand

In this lesson

Is there a way to refactor with even a simpler logic?

const monsterFactory = (name, age) => {
  return { 

is there a way to create an even more refactored logic where if we have arguments, return them as key-value pairs?
Maybe it’s a dumb question but I’m just curious :slight_smile:
for example if we were to pass 10 arguments

const foo = (arg1, arg2, …, arg10) => {
return args as key -> value }
without having to write all the arguments again in the body.

What logic though, because that function still needs to obtain those STRINGS from somewhere. You’re not providing keys, only values when you’re calling that function, the keys are hard coded strings in that function.