No return statement used in explaining the literal object declaration

Tell us what’s happening:

Your code so far

const createPerson = (name, age, gender) => {
 "use strict";
 // Only change code below this line
return {name,age,gender};
 // Only change code above this line


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36.

Challenge: Write Concise Object Literal Declarations Using Object Property Shorthand

Link to the challenge:

Hello there.

You have not asked a question, but here is some information concerning your title:

const a = (b) => (b+1)

Is the same as:

const a = (b) => { return b+1 }

That is just how arrow function syntax works. There is no need to use the return keyword, if you do not use { }.

Hi @priyanka24017 ,

Is your code not working?