Javascript examples for Function:Function Argument
Calling a function without parentheses
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {/*from w w w.j a v a 2s .c o m*/ var o = {}; Object.defineProperty(o, "helloWorld", { get: function() { console.log("hello world"); }, set: undefined }); o.helloWorld; // will show "hello world" in console }); </script> </head> <body> </body> </html>