Skip to content

Commit 71aadcb

Browse files
committed
remove unnecessary variable to return directly
1 parent 205ef82 commit 71aadcb

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

contains-duplicate/mmyeon.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,5 @@
1818
*/
1919

2020
var containsDuplicate = function (nums) {
21-
const uniqueNumbers = new Set(nums);
22-
23-
return uniqueNumbers.size !== nums.length;
21+
return new Set(nums).size !== nums.length;
2422
};

0 commit comments

Comments
 (0)