Skip to content

Commit 57d89db

Browse files
committed
Merge branch '황은지' of https://github.com/CodingTestStudy2/Daily_Coding_Test into 황은지
2 parents a4afdc9 + 45bf9dc commit 57d89db

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* @param {number} length
3+
* @param {number} width
4+
* @param {number} height
5+
* @param {number} mass
6+
* @return {string}
7+
*/
8+
var categorizeBox = function (length, width, height, mass) {
9+
const bulky =
10+
length >= 10000 ||
11+
width >= 10000 ||
12+
height >= 10000 ||
13+
length * width * height >= Math.pow(10, 9);
14+
const heavy = mass >= 100;
15+
16+
if (bulky) {
17+
if (heavy) return "Both";
18+
else return "Bulky";
19+
} else {
20+
if (heavy) return "Heavy";
21+
else return "Neither";
22+
}
23+
};

0 commit comments

Comments
 (0)