Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Typed Arrays</h1>
<h2>The find() Method</h2>
<p>The value of the first element that contains a value over 18 is:</p>
<p id="demo"></p>
<script>
const myArr = new Int16Array(10);
myArr.fill(20);
document.getElementById("demo").innerHTML = myArr.find(check);
function check(x) {
  return x > 18;
}
</script>
</body>
</html>