I cant do it this exercise, any help will be welcome.
function getCaloriesFromInputs(list) {
let calories = 0;
for (const item of list) {
const currVal = cleanInputString(item.value);
const invalidInputMatch = isInvalidInput(currVal);
if (invalidInputMatch) {
alert("Invalid Input: ")
}
}
}
Error:
You should use a template literal to pass the "Invalid Input: "
message to the alert()
function.
Link to exercise:
Learn Form Validation by Building a Calorie Counter - Step 61