is it possible to skip values while using the map method in javascript?
so for example
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
var numbers = [4, 9, 16, 25];
function myFunction() {
x = document.getElementById("demo")
x.innerHTML = numbers.map(Math.sqrt);
}
</script>
</body>
</html>
this code is going to output 2,3,4,5
but can you make it output 2,4 so it checks the first value in the array then skips the second until the end
or
3,5 so it skips the first value in the array then checks the second value.
is this possible using the map method? or do I have to use a for loop?