two strings password and password_repeat. both passwords must match – password must be at least 20 chars

function checkPassword(password, password_repeat) {
  let p = /^(?=.*[0-9])(?=.*[!@#$%^&*])[a-zA-Z0-9!@#$%^&*]{20,150}$/;
  if (password.match(p) == password_repeat) {
    return true;
  } else {
    return false;
  }
}