Practicing for JavaScript Loops of Web Design & Development

Questions 1 of 10
  • Q. What will be the output of the following JavaScript code?
    function printArray(a) {
      var len = a.length, i = 0;
      if (len == 0)
       console.log("Empty Array");
      else {
       do {
        console.log(a[i]);
       } while (++i < len);
      }
    }