cara hanya menerima email dalam format [email protected] js

// It's easy
const email = "[email protected]"

function ValidateEmail(mail) {
    if (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(mail)) {
      console.log("It's a valid email!")
    }else{
      console.log("Not a valid email :(")
    }
  }

  ValidateEmail(email);
Code Sir