javascript - Write conditional statement for a range (3 < x < 9) -
how should write if statement true given range e.g. return true x if (3 < x < 9) ?
if ((mynum > 3) || (mynum < 9)) { document.getelementbyid("div").innerhtml = "<button>hello world</button>"; }
use correct operator ||
or
operator, use and
operator &&
if ((mynum > 3) && (mynum < 9)) { document.getelementbyid("div").innerhtml = "<button>hello world</button>"; }
cheers !!
Comments
Post a Comment