Stuck @ LearnJavascript 6. Return II, 2


As I understand, there are 2 learning programs for Javascript, "Javascript" and "Learn Javascript ". This question is about LearnJavascript - 6.return II. In both learning programs I am stucked at the return level. Please help me, I don't understand why point 2 of this exercise is not cleared. Can someone provide me with adaquate code. Thank you.


Jeff Braun



Please post your code because even your photo hasn't finished uploading and even if it does it is much easier and more efficient t provide support with your code as a reference. :slight_smile:



Hi Bandit, Thank you, here is the code


Hey! You're missing a parameter in line 12 where you stated getSubTotal.
SInce you're returning the getSubTotal function with the parameter, it is

getSubTotal(orderCount) * 0.06 :smile:

Here is my previous code but don't just copy and paste it until you fully understand why the parameter needs to be there.
/* 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;

function getTax() {
return getSubTotal(orderCount) * 0.06;

function getTotal(){
return getSubTotal(orderCount) + getTax();
takeOrder('bacon', 'thin');
takeOrder('pepperoni', 'regular');
takeOrder('pesto', 'thick');



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