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.
2 parents 1b4d8fa + c27c8ab commit 434dce6Copy full SHA for 434dce6
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