Build a Calculator - Step 2

Tell us what’s happening:

I don’t understand… maybe more info or other examples. I watched and rewatched the videos. I didn’t have these issues with HTML or CSS. feel like I’m having to stumble on to the answer vs executing with confidence. JavaScript does not feel like previous lessons. It feels incomplete.

Your code so far


// User Editable Region

function addTwoAndSeven(num1, num2) {
  return num1 + num2;
}
console.log(addTwoAndSeven(2, 7));

// 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/136.0.0.0 Safari/537.36

Challenge Information:

Build a Calculator - Step 2

Hi there, welcome! :waving_hand:

The lesson asked you to:

Inside your addTwoAndSeven function, return the sum of 2 and 7.

But your current code goes a bit beyond what’s needed. To match the lesson instructions, you can simplify your function:

  1. Remove the parameters (num1, num2) from the function declaration and also from the return statement.
  2. You can remove the console.log statement for now — it’s not part of the task.

Just keep it minimal as the lesson focuses on the basics. You’re almost there!

1 Like