This may all be simplified, by getting rid of the checkAdult function by using a fat arrow operator in TypeScript like this:
function myFunction() { document.getElementById("demo").innerHTML = ages.some(a => (a >= 18)); }
No comments:
Post a Comment