This website works better with JavaScript
Sākums
Izpētīt
Palīdzība
Reģistrēties
Pierakstīties
Ethosa
/
Learn
spogulis no
https://github.com/Ethosa/Learn
Vērot
1
Pievienot zvaigznīti
0
Atdalīts
0
Faili
Problēmas
0
Vikivietne
Koks:
5ca0001a70
Atzari
Tagi
main
Learn
/
Languages
/
js-rush
/
task2
Ethosa
f085424687
add `js-rush` folder
3 gadi atpakaļ
..
main.js
f085424687
add `js-rush` folder
3 gadi atpakaļ
readme.md
f085424687
add `js-rush` folder
3 gadi atpakaļ
readme.md
Area of a Triangle
Write a function that takes the base and height of a triangle and return its area.
Examples
triArea(3, 2) ➞ 3 triArea(7, 4) ➞ 14 triArea(10, 10) ➞ 50
Notes
The area of a triangle is: (base * height) / 2
Don't forget to return the result.