Javascript for Statement Question 10

Introduction

Iterate Array

Print all values in a given array.


function itr_array(arr) {
  //your code
}
itr_array([1,2,3]);



function itr_array(arr) {
  for (var i = 0; i < arr.length; i++) {
    console.log(arr[i]);
  }
}
itr_array([1,2,3]);



PreviousNext

Related