Tell us what’s happening:
Build a calculator step 2 JavaScript
const addTwoAndSeven = (a, b) => a + b;
console.log(addTwoAndSeven(2, 7));
and
function addTwoAndSeven(a, b) {
return a + b;
}
console.log(addTwoAndSeven(2, 7));
gives this output
// running tests
- Your addTwoAndSeven function should return the sum of 2 and 7.
- Your addTwoAndSeven function should return the sum using the + operator.
// tests completed
// console output
9
and still doesn’t accept the code
Your code so far
// User Editable Region
function addTwoAndSeven(a, b) {
return a + b;
}
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/143.0.0.0 Safari/537.36
Challenge Information:
Build a Calculator - Step 2