Display fail


#1

earn java script
functions and scope
functions
3/7

hello community,
someone can tel me why my console display : Order : pizza topped with baconundefined
instead of : Order : pizza topped with bacon
thanks

function takeOrder(topping) {
  
  
  console.log('Order : pizza topped with bacon'+topping);
  
}

takeOrder();

#2

here:

takeOrder();

you call the function, you should supply an argument to satisfy the function parameter (topping), otherwise it will be undefined


#3

thank you :slight_smile:

function takeOrder(topping) {
  
  
  console.log('Order : pizza topped with '+topping);
  
}

takeOrder('bacon');

#4