Javascript examples for Function:Function Return
Getting return value of function object
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function a() { //do something if (true) {//from ww w . j av a 2 s .co m //do other things } else { return false; } //Do final things return true; } function b() { var p = a(); console.log(p); //will return true } b(); </script> </head> <body> </body> </html>