Learn Form Validation by Building a Calorie Counter - Step 75

Tell us what’s happening:

i dont why am i getting the following message on my code;
You should call getCaloriesFromInputs with [budgetNumberInput] as the argument.

Your code so far

<!-- file: index.html -->

/* file: styles.css */

/* file: script.js */
// User Editable Region

function calculateCalories(e) {
  e.preventDefault();
  isError = false;

  const breakfastNumberInputs = document.querySelectorAll('#breakfast input[type=number]');
  const lunchNumberInputs = document.querySelectorAll('#lunch input[type=number]');
  const dinnerNumberInputs = document.querySelectorAll('#dinner input[type=number]');
  const snacksNumberInputs = document.querySelectorAll('#snacks input[type=number]');
  const exerciseNumberInputs = document.querySelectorAll('#exercise input[type=number]');

  const breakfastCalories = getCaloriesFromInputs(breakfastNumberInputs);
  const lunchCalories = getCaloriesFromInputs(lunchNumberInputs);
  const dinnerCalories = getCaloriesFromInputs(dinnerNumberInputs);
  const snacksCalories = getCaloriesFromInputs(snacksNumberInputs);
  const exerciseCalories = getCaloriesFromInputs(exerciseNumberInputs);
const budgetCalories = getCaloriesFromInputs(budgetNumberInputArray);
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Learn Form Validation by Building a Calorie Counter - Step 75

Hi there,

First of all, there are no variable named budgetNumberInputArray.
There are only variable named budgetNumberInput.

Secondly, the instruction said:

pass an array containing your budgetNumberInput as the argument.

That means the argument must be an array with one element: budgetNumberInput

For example:

const name = "John";

then [name] is an array just like this array: ["John"]

In fact, the error message said pretty clear:

You should call getCaloriesFromInputs with [budgetNumberInput] as the argument.