Skip to content

Conversation

@johanaggu
Copy link

No description provided.

@@ -1,5 +1,6 @@
const triangleArea = (base, height) => {

let area = (base * height) / 2
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
let area = (base * height) / 2
let area = (base * height) / 2;

const triangleArea = (base, height) => {

let area = (base * height) / 2
return area
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
return area
return area;

Copy link
Contributor

Choose a reason for hiding this comment

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

Al estar utilizando una Arrow function no es necesario utilizar el return, puedes utilizar directamente el return de área y el cálculo que deseas realizar.

Copy link
Author

Choose a reason for hiding this comment

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

Lo trate de hacer así pero al correr el test me arrojaba un "FAIL"

@gndx gndx self-requested a review July 24, 2020 21:18
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