JavaScript - Array find() example (returns the value) - 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 find() example (returns the value) (/showthread.php?tid=4123) |
JavaScript - Array find() example (returns the value) - Qomplainerz - 04-04-2023 The HTML part between the <body></body> tags looks like this: Code: <p>Click "Test" to return the value of the first element in the array that has a value above this number:</p> The JavaScript part looks like this: Code: const ages = [4, 12, 16, 20]; |