I am learning JS , and i am trying to do this :
define a function named eat that takes an argument named food that is expected to be a string.
Inside the function return the food argument like this:
return food + ' tasted really good.';Inside of the parentheses of console.log(), call the eat() function with the string bananas as the argument.
Here is my code :
function eat(food) {
return food + 'tasted really good.';
}
console.log(eat('bannanas'));
Thing is that i get 'bannanas' to concatenate with other text (bannanastasted really good.), can someone tell me where I am making a mistake . Thank you. :)