Question: The code: const stateCodeLookup = stateCode => { const states = [ny,wa, ca]; states.push(nj); for (let i = 0; i if (states[i] ==stateCode) { return
The code:
const stateCodeLookup = stateCode => {
const states = ["ny","wa", "ca"];
states.push("nj");
for (let i = 0; i
if (states[i] ==stateCode) {
return true;
}
}
return false;
};
Based on the code above,what is the value of thestates.lengthwhen theforloop's condition is evaluated?
Your answer:
Step by Step Solution
3.57 Rating (154 Votes )
There are 3 Steps involved in it
In the provided code the for loops condition is not complete Howev... View full answer
Get step-by-step solutions from verified subject matter experts
