Well, nothing. I typed the for loop, but it doesn’t seem to be recognizing its existence. I tried it a few ways… am I misunderstanding it?
Console returns this same message every time: // running tests Your for
loop should initialize a variable called i
to 0
. Your for
loop should have a condition that checks if i
is less than the length of strArray
. Your for
loop should increment i
by 1
each time it runs. Use the increment operator for this. // tests completed
Your code so far
WARNING
The challenge seed code and/or your solution exceeded the maximum length we can port over from the challenge.
You will need to take an additional step here so the code you wrote presents in an easy to read format.
Please copy/paste all the editor code showing in the challenge from where you just linked.
for (i = 0; i < strArray.length; i++ ) {
}
function cleanInputString(str) {
const strArray = str.split('');
const cleanStrArray = [];
for (i = 0; i < strArray.length; i++ ) {
return cleanStrArray;
}
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Challenge Information:
Learn Form Validation by Building a Calorie Counter - Step 21