I am still getting the hang of javascript and working on some coding projects from my textbooks. The current task involves creating an if statement to check if the values of the elements referenced by the names fname, lname, and zip are all not null.
Here is the script I have written so far:
var newAccountArray = [];
function createID() {
var fname = fnameinput;
var lname = lnameinput;
var zip = zipinput;
var account = accountidbox
var fields = input;
var acctid;
var firstInit;
var lastInit;
if ( !== null)
}
I'm curious about whether I need to approach multiple variables differently in this case.
Should I use if (myVar) or if (myVar !== null)