return false if any member is greater than 4
The following function will return false if any number in an array of numbers is greater than 4. Otherwise, the function will return true
function lessThanFive(numbers) {
  for (let number of numbers) {
    if (number > 4) {
      return false;
    }
  }
  return true;
}
by Valeri Tandilashvili
2 years ago
JavaScript
return
0
Pro tip: use ```triple backticks around text``` to write in code fences