Javascript examples for Object:Module
Accessing variable in module
<html> <head></head> <body> <script> function test() {//from ww w . j av a2 s . c o m var startPoint = "x,y" return { startPoint: startPoint, globalOptions: { logo: false, center: startPoint } }; } console.log(test().startPoint) console.log(test().globalOptions) </script> </body> </html>