Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<h1>JavaScript Arrays</h1>
<h2>The findLast() Method</h2>
<p id="demo"></p>
<script>
const temp = [27, 28, 30, 40, 42, 35, 30];
let high = temp.findLast(x => x > 40);
document.getElementById("demo").innerHTML = "The last temperature over 40 was " + high;
</script>
</body>
</html>