Skip to content

Commit 06ca5eb

Browse files
authored
Create 2527-find-xor-beauty-of-array.js
1 parent 77d0c7a commit 06ca5eb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

2527-find-xor-beauty-of-array.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/**
2+
* @param {number[]} nums
3+
* @return {number}
4+
*/
5+
const xorBeauty = function(nums) {
6+
let res = 0
7+
for(const e of nums) res ^= e
8+
return res
9+
};

0 commit comments

Comments
 (0)