<Below this line, in what way does your code behave incorrectly? Include ALL error messages.>
Cannot get the variable customPizza to work. Error message: Oops! The test returned an error. Maybe you have a syntax error, or a typo. See full error.
```
var makePizza = function (topping, crustType) {
return makePizza = topping, crustType;
};
var customPizza = function (makePizza) {
return customPizza = topping, crustType;
};
All of this is good!
The problem starts with what you are returning. It asks you to “use return to return the string that you previously used console.log to print before”
I believe that the string you are trying to return is, ‘The ’ + crustType + ’ crust pizza topped with ’ + topping + ’ is done. Let’s eat!’.
Additionally, when you’re defining your variable, customPizza, you’re not creating a function which is what you are trying to do. It asks you to call the makePizza function, which means passing the makePizza function arguments. The format of this is nameOfFunction(specificArgument, specificArgument)
The name of function in this case is makePizza, and you pass it argument by writing a topping then inserting a comma, then inserting a crus type.
The last thing I’ll mention is that because you aren’t defining a function, you do not need the curly braces with customPizza.
I’m still working on the pizza.js code, and not getting very far.
Here is my updated code:
var makePizza = function (crustType, topping) {
return makePizza(thick, pepperoni);
};
customPizza = makePizza (crustType, topping)
return customPizza (‘The ’ + thick + ’ crust pizza topped with ’ + pepperoni + ’ is done. Let’s eat!’);
console.log(crustType + topping);
I’m not getting any error messages or answers on the browser on the right-hand side. Just a red dot next to customPizza = makePizza(crustType, topping)
I tried that, it’s still not working. Seems like I get through the early part of each lesson and then run into trouble in the later parts. So frustrating.
In your return statement, your makePizza parameters should just be crustType and topping. This way when you call your function, you can pass arguments to it like “thick” and “pepperoni”. Your return statement is also missing the text string where the pizza is described.
I want to apologize to you and Kyleaw if I’m bothering you. I have found some the directions in some of the exercises very confusing.And it’s been quite frustrating to me.
If you cannot read it (somewhat small size), let me know and I’ll resend it. What happened was that I got a dialog box telling me that this lesson was moved to a different lesson. It gave me the choice to fix it (don’t remember the exact wording), meaning I would have to restore everything and start the entire section over again, or cancel. I pressed on cancel.
I hope this helps. I wish I could have gotten a screen shot with the dialog box in it.