let email = 'xyz@gmail.com'; let getDomain = email.substring(email.indexOf('@') + 1); console.log(getDomain); // output - gmail.com