If statements

Apologies if this has been posted b4, but I cannot find anything in the search…

I want to trigger functions according to a set condition… what I am trying to say is…

if ( the value is more than 6 but less than 18) {
do this()
// everything between and including 6 and 18 , i want to trigger 1 function…

} else {
do this()
//everything else 1,2,3,4,5,19,20,21 etc I would like to trigger another function
}

Question, how do I write that condition…

Cheers in advance…