I have a function that performs different actions on the page according to the callback passed to it, I am using if
to check which callback was called in function('callback')
but now I had to do an update on it and now it is like this :
function Acoes(e){
if(e == 1){...}
if(e == 2){...}
if(e == 3){...}
if(e == 4 && foo == ""){...}else{...}
}
-
a) What will happen if
e
is equal to 3 andfoo
is not empty? -
b) The
if
corresponding toe == 3
will be executed alongelse
ofif e == 4
?