<reponame>ahmad1091/Data-structure-and-algorithms<filename>codeSignal/findEmailDomain.js<gh_stars>0function solution(address) {
  let domain =
    address.split("@").length > 2
      ? address.split("@")[address.split("@").length - 1]
      : address.split("@")[1];
  return domain;
}

// console.log(solution("anpch@example.com"));
console.log(solution("\"very.unusual.@.unusual.com\"@usual.com"));

