//Syntactic Sugar for a ForEach loop below; this is part of a form validation
//and basicly goes through every element in the form and logs the id for said
//element.
function checkRequired(inputArr) {
// |
//? V High Order Array Method
inputArr.forEach(function (input) {
console.log(input.id)
});
}
//! Event Listeners --> This is a higher order functon
form.addEventListener('submit', function (e) {
e.preventDefault();
//passing in array of arguments to be checked
checkRequired([username, email, password, password2]);
});