scrimba
Learn Modern JavaScript
Write Concise Object Literal Declarations Using Simple Fields
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Write Concise Object Literal Declarations Using Simple Fields
AboutCommentsNotes
Write Concise Object Literal Declarations Using Simple Fields
Expand for more info
index.js
run
preview
console
const createPerson = (name, age, gender) => {

return {
name: name,
age: age,
gender: gender
};

};
console.log(createPerson("Zodiac Hasbro", 56, "male"));
Console
{name:
"Zodiac Hasbro"
, age:
56
, gender:
"male"
}
,
index.html
-1:38