Result Size: 300 x 150
x
 
<!DOCTYPE html>
<html lang='uk'>
<body>
<h2>JavaScript Array.lastIndexOf()</h2>
<p id="demo"></p>
<script>
const fruits = ["Apple", "Orange", "Apple", "Mango"];
let position = fruits.lastIndexOf("Apple") + 1;
document.getElementById("demo").innerHTML = "Apple is found in position " + position;
</script>
</body>
</html>