Javascript examples for Function:Function Definition
Accessing the variable inside function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=function(){/*from w ww. j a va2s .c o m*/ _ = {}; _.Qj = function () { function a() { return 'foo' } return { er: a } }(); console.log(_.Qj.er()) } </script> </head> <body> </body> </html>