5/11 2Q .return HELP



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’)

<do not remove the three backticks above>


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:


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