In JavaScript, if you have an if … else if … else situation, does the computer keep checking the next condition if it previously triggered another condition? E.g. if the first if condition is true and the code executes, does it still attempt to check the conditions for else if or else?
In JavaScript, if you have an if … else if … else situation, does
Share
No it won’t check if the next condition is true, since you are using
else if.Instead, if you use
if…if…if, then allifstatement will be executed.