Array forEach Method

Loop through an array using forEach.

Preview

Code

<script>
let numbers = [1,2,3];

numbers.forEach(function(n){
  console.log(n);
});
</script>

More JS Arrays Examples (7)