QP School
JavaScript Array every() example - Printable Version

+- QP School (https://qomplainerzschool.lima-city.de)
+-- Forum: Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=3)
+--- Forum: JavaScript Tutorials (https://qomplainerzschool.lima-city.de/forumdisplay.php?fid=6)
+--- Thread: JavaScript Array every() example (/showthread.php?tid=4087)



JavaScript Array every() example - Qomplainerz - 04-04-2023

Code:
const ages =
      [
        32,
        33,
        16,
        40
      ];

function checkAge(ages)
{
  return ages > 18;
}

document.getElementById("demo").innerHTML = ages.every(checkAge);