Skip to content

Fatemah AlAttar#11

Open
EngFAlAttar wants to merge 2 commits intoJoinCODED:mainfrom
EngFAlAttar:main
Open

Fatemah AlAttar#11
EngFAlAttar wants to merge 2 commits intoJoinCODED:mainfrom
EngFAlAttar:main

Conversation

@EngFAlAttar
Copy link

No description provided.

// return numbers
// }

const squares= (numbers: number[]):number[] => numbers.map((x)=>square(x))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the input of the arrow function, and the input of the function it calls are the same:

numbers.map((x)=>square(x))

You can do this:

numbers.map(square)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants