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

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -