Not exactly sure why this is kicking back the SyntaxError. Looked it up, but cant seem to wrap my head around whats creating the error. My code looks to me exactly like the solution, so I have to be missing something. If anyone can explain what im missing that would be fantastic!
Console kicks back:
SyntaxError: unknown: Missing semicolon. (9:33)
7 | // Only change code below this line
8 | const failureItems = [];
> 9 | for (i = 0, i < arr.length, i++) {
| ^
10 | failureItems.push(`<li class="text-warning">`${arr[i]}`</li>`);
My Code so far
const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["no-extra-semi", "no-dup-keys"]
};
function makeList(arr) {
// Only change code below this line
const failureItems = [];
for (i = 0, i < arr.length, i++) {
failureItems.push(`<li class="text-warning">`${arr[i]}`</li>`);
}
// Only change code above this line
return failureItems;
}
const failuresList = makeList(result.failure);
Challenge: Create Strings using Template Literals
Link to the challenge: