Files
Randell Dawson 1494a50123 fix(guide): restructure curriculum guide articles (#36501)
* fix: restructure certifications guide articles
* fix: added 3 dashes line before prob expl
* fix: added 3 dashes line before hints
* fix: added 3 dashes line before solutions
2019-07-24 13:29:27 +05:30

635 B

title
title
Write Concise Object Literal Declarations Using Simple Fields

Write Concise Object Literal Declarations Using Simple Fields


Problem Explanation

Here, we are tasked at returning an object that accepts the function's parameters as its attributes.


Hints

Hint 1

Get rid of the colons, and the duplicate words.


Solutions

Solution 1 (Click to Show/Hide)
const createPerson = (name, age, gender) => {
  "use strict";
  // change code below this line
  return {
    name,
    age,
    gender
  };
  // change code above this line
};