Hi Folks,
What am I doing wrong here?
const result = {
success: ["max-length", "no-amd", "prefer-arrow-functions"],
failure: ["no-var", "var-on-top", "linebreak"],
skipped: ["id-blacklist", "no-dup-keys"]
};
function makeList(arr) {
"use strict";
// Only change code below this line
const resultDisplayArray = [];
for(let i = 0; i<result.failure.length; i++){
resultDisplayArray.push(`<li class="test-warning">${result.failure[i]}</li>`);
}
// Only change code above this line
return resultDisplayArray;
}
const resultDisplayArray = makeList(result.failure);
console.log(resultDisplayArray)
//Output below
// running tests
resultDisplayArray should be equal to the specified output.
// tests completed
// console output
[ '<li class="test-warning">no-var</li>',
'<li class="test-warning">var-on-top</li>',
'<li class="test-warning">linebreak</li>' ]