6/13 - Please solve my doubt smart ppl :)


hi guys
regarding the chapter 6 of Introduction to Functions in JS, I have the issue as shown in the image.

Although I am multiplying the price by 5 and I am getting value 25, yet there is error which says function doesn't returns 25.

Also I am calling the function only once in line 5, yet the output window shows the output twice! can simebody explain this why so??

When I comment out line 3 my problem gets solved though. But just help me in making me realise why the output window gives output of the function twice when I have called the function only once.


Remove all extra's from your console.log()
only use price
At the end of your code add
console.log("My end");


Hello !! this is the code, past one long time I can fin the answer, I hope help you !!

var costoNaranjas = function (precio) {
console.log(costoNaranjas * 5);

this code is in Spanish because it is my lenguaje!!
Greetings and Kiss !! ....


For everybody who uses
the function of @chippro98832

will run into a so-called MAXIMUM-Recursion ERROR
The limits are Browser-specific
= http://stackoverflow.com/questions/2805172/what-are-the-js-recursion-limits-for-firefox-chrome-safari-ie-etc
= http://stackoverflow.com/questions/6095530/maximum-call-stack-size-exceeded-error


You should do this

var orangeCost = function (price) {
console.log(price * 5)