본문 바로가기
알고리즘/Codewars

[Codewars] Volume of a Cuboid (8 kyu) / JavaScript

by fluss 2022. 10. 22.

https://www.codewars.com/kata/58261acb22be6e2ed800003a

 

Codewars - Achieve mastery through coding practice and developer mentorship

Coding practice 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:

Bob needs a fast way to calculate the volume of a cuboid with three values: the length, width and height of the cuboid. Write a function to help Bob with this calculation.

 

설명:

Bob needs a fast way to calculate the volume of a cuboid with three values: the length, width and height of the cuboid. Write a function to help Bob with this calculation.

Bob은 세 가지 값(길이, 너비 그리고 높이)을 가진 직육면체의 부피를 계산하는 빠른 방법이 필요합니다. Bob이 이 계산을 하는데 도움을 주는 함수를 작성하세요.

 

풀이

class Kata {
  static getVolumeOfCuboid(length, width, height) {
    return length * width * height;
  }
}

 

 

댓글