https://www.codewars.com/kata/565f5825379664a26b00007c
Codewars - Achieve mastery through coding practice and developer mentorship
A coding practice website for all programming levels – Join a community of over 3 million developers and improve your coding skills in over 55 programming languages!
www.codewars.com
DESCRIPTION:
Write a function that returns the total surface area and volume of a box as an array: [area, volume]
코드
function getSize(width, height, depth){
return [2 * (width * height + height * depth + width * depth), width * height * depth]
}
'알고리즘 > Codewars' 카테고리의 다른 글
[Codewars] Name Shuffler (8 kyu) / JavaScript (0) | 2023.03.31 |
---|---|
[Codewars] Directions Reduction (5 kyu) / JavaScript (0) | 2023.03.30 |
[Codewars] Sort Numbers (7 kyu) / JavaScript (0) | 2023.03.28 |
[Codewars] All Star Code Challenge #18 (8 kyu) / JavaScript (0) | 2023.03.27 |
[Codewars] Enumerable Magic - Does My List Include This? (8 kyu) / JavaScript (0) | 2023.03.26 |
댓글