Q:

Write a JavaScript program to check whether a given number is in a given range

0

 Write a JavaScript program to check whether a given number is in a given range

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

function is_inrange(x, y, z) 
{
    return y >= x && y <= z;
}

console.log(is_inrange(1,2,3));
console.log(is_inrange(1,2,-3));
console.log(is_inrange(1.1,1.2,1.3));

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now