JavaScript: Check whether two given integer values are in the range 50..99
JavaScript Basic: Exercise-28 with Solution
Check if Two Integers are in Range 50–99
Write a JavaScript program to check whether two given integer values are in the range 50..99 (inclusive). Return true if either of them falls within the range.
This JavaScript program checks if either of two given integers falls within the range of 50 to 99 (inclusive). It uses conditional statements to evaluate whether each integer is within the specified range and returns true if at least one of them meets the condition.
Visual Presentation:

Sample Solution:
JavaScript Code:
Output:
false true true
Live Demo:
Flowchart:

ES6 Version:
For more Practice: Solve these Related Problems:
- Write a JavaScript program that checks if both given integers fall within the range 50 to 99 (inclusive).
- Write a JavaScript program that verifies if at least one of two provided numbers is within the range 50..99.
- Write a JavaScript program that accepts two integers and returns a message indicating which one, if any, is within the 50 to 99 range.
Improve this sample solution and post your code through Disqus.
Previous: JavaScript program to check if a string starts with 'Java' and false otherwise.
Next: JavaScript program to check if three given integer values are in the range 50..99.
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.