5/11 2Q .return HELP


#1

https://www.codecademy.com/courses/learn-javascript-functions/lessons/functions/exercises/return?action=lesson_resume&course_redirect=introduction-to-javascript

IDK it was just fine and than at the next lesson it has a error

```

const orderCount = 0

const takeOrder = (topping,crustType)=> orderCount++; {
console.log(‘Order: ‘+crustType+’ Pizza topped with’+topping)
}

takeOrder(‘bacon’,‘thin crust’)
takeOrder(‘Super’,‘Supe’)
takeOrder(‘Mad’,‘mad’)

<do not remove the three backticks above>

#2

Hi @aaronjoseph2001,

If you’re going to increase orderCount, then let should be used, const is for a variable that you don’t want the value to change.

Another thing, your orderCount++ should be inside the code block, where the code is being executed, means everything should be inside the { } curly bracket.

Lastly, remember to follow the instruction to print exactly the sentence, spacing and capital wise. The checking system is a bit strict on this one.

Come back if you have more questions. :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.