Returnning in a Function


How do you use console.log to print out the result of a return?


If you want to see the return value of a function via console.log directly, you could just call the function inside a console.log.

var abc = function(a, b){
return a + b
console.log(abc(1,2)) // result 3 in console

look code above


Thanks alot. Seriously..