Setting object literal value dynamically - Javascript Object

Javascript examples for Object:Object Literal

Description

Setting object literal value dynamically

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
      <script type="text/javascript">
    window.onload=( function() {/*from   www . j a  v a 2  s  .c om*/
var blah = 'blah_str';
var object_pipe = {
    model : 'ABC',
    page  : {
        email: '0'
    },
    args  : {
        hash : blah
    }
};
console.log(object_pipe.args.hash)
    });

      </script> 
   </head> 
   <body>  
   </body>
</html>

Related Tutorials