Quantcast
Channel: Active questions tagged return-value - Stack Overflow
Viewing all articles
Browse latest Browse all 228

What does a function return if it does not contain a `return` statement?

$
0
0

I've watched some videos and they said "functions always return a value". If we don't use the return statement, then what does it return instead? Like the function below:

function Foo(){    var x = 4.    y =5;    z = x + y;}x = Foo();console.log(x);

Viewing all articles
Browse latest Browse all 228

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>