const isRangedNumber = [1, 7];
let Validator = isRangedNumber.some((valid)=> valid === 5);
console.log(Validator);
some
function createRange(a, b) {
const range = [];
for (let i = a; i <= b; i++) {
range.push(i);
}
return range;
}
const a = 1;
const b = 7;
const isRangedNumber= createRange(a, b);
let Validator = isRangedNumber.some((valid)=> valid === 5);
console.log(Validator);