Tell us what’s happening:
why is the code not showing the results, i’m I supposed to use any console? I really don’t understand why the function is not running.
Your code so far
return num * 5
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36.
Challenge: Return a Value from a Function with Return
Link to the challenge:
Learn to code. Build projects. Earn certifications.Since 2015, 40,000 graduates have gotten jobs at tech companies including Google, Apple, Amazon, and Microsoft.
I ran the code and it passes the test
Might be just some catch causing an error. Try emptying it
Switch over to lightmode
or switch to another browser
the function is running, you just don’t have anything to print the result to the console
for that you can wrap the function calls in
okay thank you, i was just confused of how to print out the function.
but again why is it that sometimes is use console.log but it shows thee value and an undefined answer below it??
I think this site:
might help to visualize that for you
@KittyKora. I figured out where the problem was.
console.log returns undefined, so you could be seeing the stuff inside the console.log printed to the console and then the return value of the console.log, some editors show the returned value of last expression in the code