Skip to content

Commit 7c2335d

Browse files
committed
가장 작은 수 제거하기 / 중급
1 parent 37deffb commit 7c2335d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
function solution(arr) {
2+
var answer = [];
3+
4+
if (arr.length === 1) return [-1];
5+
6+
const min = Math.min(...arr);
7+
answer = arr.filter((num) => num !== min);
8+
return answer;
9+
}

0 commit comments

Comments
 (0)