Tell us what’s happening:
Describe your issue in detail here.
How does “return” differ from “console.log()”? Could I have written what is below as such? Sorry for the silly question; I was just trying to understand the difference. Thank you!
function plusThree(num) {
console.log( num + 3);
}
const answer = plusThree(5);
Your code so far
function plusThree(num) {
return num + 3;
}
const answer = plusThree(5);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36
Challenge Information:
Basic JavaScript - Return a Value from a Function with Return