From c4015bf16a94ed6520bd09a0b0ad857f97866928 Mon Sep 17 00:00:00 2001 From: Abhisek Pattnaik Date: Thu, 31 Dec 2015 02:30:33 +0530 Subject: [PATCH] Iterate Through an Array with a For Loop Fix instruction in Waypoint: Iterate Through an Array with a For Loop --- .../basic-javascript.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/seed/challenges/01-front-end-development-certification/basic-javascript.json b/seed/challenges/01-front-end-development-certification/basic-javascript.json index d8f1a5c093..38fccc2552 100644 --- a/seed/challenges/01-front-end-development-certification/basic-javascript.json +++ b/seed/challenges/01-front-end-development-certification/basic-javascript.json @@ -4014,7 +4014,7 @@ "
var arr = [10,9,8,7,6];
for (var i=0; i < arr.length; i++) {
console.log(arr[i]);
}
", "Remember that Arrays have zero-based numbering, which means the last index of the array is length - 1. Our condition for this loop is i < arr.length, which stops when i is at length - 1.", "

Instructions

", - "Create a variable total. Use a for loop to add each element of myArr to total." + "Declare and initialize a variable total to 0. Use a for loop to add the value of each element of the myArr array to total." ], "releasedOn": "January 1, 2016", "challengeSeed": [