Skip to content

Instantly share code, notes, and snippets.

@Octagon-simon
Created October 27, 2021 09:29
Show Gist options
  • Select an option

  • Save Octagon-simon/9e2965b6fa4eb9d2a8b21824e1ebfe1d to your computer and use it in GitHub Desktop.

Select an option

Save Octagon-simon/9e2965b6fa4eb9d2a8b21824e1ebfe1d to your computer and use it in GitHub Desktop.
function saveForm(fname, lname, email) {
//Check form fields
if(!fname){
alert('First Name is required');
}else if(!lname){
alert('Last Name is required');
}else if(!email){
alert('Email Address is required');
}else{
//Save form inputs to our Array
fnameArry.push(fname);
lnameArry.push(lname);
emailArry.push(email);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment