Property Value Shorthand

In this lesson https://www.codecademy.com/paths/web-development/tracks/web-dev-js-arrays-loops-objects/modules/learn-javascript-objects/lessons/advanced-objects/exercises/prop-val-shorthand

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

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

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.