We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 37deffb commit 7c2335dCopy full SHA for 7c2335d
JooKangSan/[week1]Array/ Remove_smallest_number.js
@@ -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