Advertisement
deddyprianto

Extract Domain Name From An Email

Jan 24th, 2022
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. let email = 'xyz@gmail.com';
  2. le getDomain = email.substring(email.indexOf('@') + 1);
  3.  
  4. console.log(getDomain); // output - gmail.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement