Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Function with FOR loop

function countToFive() {
  let firstFive = "12345";
  let len = firstFive.length;
  // Fix the line below
  for (let i = 0; i < len; i++) {
    // Do not alter code below this line
    console.log(firstFive[i]);
  }
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #Function #FOR #loop
ADD COMMENT
Topic
Name
5+4 =