Exercise 5 - Return


Hi there! I’m a bit stucked with this exercise, it really looks that my code is fine but I still getting error message, I tried with several browsers (chrome, safari, firefox) and always the same error… thanks for your help!

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

The code runs perfect, but I still get the same error message: Did you put the getSubTotal function call inside of a console.log statement?



var orderCount = 0;
function takeOrder(topping, crustType) {
  console.log('Order: ' + crustType + ' crust topped with ' + topping);
  orderCount = orderCount + 1;
function getSubTotal(itemCount) {
  return itemCount * 7.5;
takeOrder('bacon', 'thin');
takeOrder('pepperoni', 'regular');
takeOrder('pesto', 'thin');

console.log (getSubTotal(orderCount));


The code looks fine.
Copy your code => Refresh the window =>Paste the code.


its technically fine, however, the progress check thing doesn’t like the space between console.log and the open parentheses. remove the space and the error should go away


Solved! thank you very much!


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