We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3cfb9a5 commit c27c8abCopy full SHA for c27c8ab
javascript/929-Unique-Email-Addresses.js
@@ -0,0 +1,11 @@
1
+var numUniqueEmails = function(emails) {
2
+ const valid=emails.map(email=>{
3
+ const [local, domain] = email.split('@');
4
+ return local.split('+').shift().split('.').join('')+'@'+domain;
5
+ });
6
+ const set=new Set(valid)
7
+
8
+ return set.size
9
10
11
+};
0 commit comments