JS Array Some & Every


Array some()

<!DOCTYPE html>
<html>
<head>
  <title>JavaScript</title>
  <script>
    var ages = [10, 13, 18, 2];
    document.write(ages + "<br>");

    var b = ages.some(checkAdult);
    document.write(b + "<br>");
  </script>
</head>
<body>

</body>
</html>


Array every()

<!DOCTYPE html>
<html>
<head>
  <title>JavaScript</title>
  <script>
    var ages = [10, 19, 18, 20];
    document.write(ages + "<br>");

    var b = ages.every(checkAdult);
    document.write(b + "<br>");
  </script>
</head>
<body>

</body>
</html>