Main js lines/commands used:
console.log(email.indexOf("@") < 0); // false
console.log(password.toUpperCase().includes("A")); // false
console.log(/[Ii][Bb][Mm]/.test(password)); // false
// avoid repetition
function writeError(message, identifier) {
document.querySelector(identifier).innerHTML = message;
}
Back to Concepts Overview