Javascript examples for Function:Function Argument
Passing Object parameters to a function
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> window.onload=( function() {//from ww w . j ava2 s .c o m func(test = { item: { subItem: 1 }, item2: { message: 'test' } },test.item2.message += ' ' + test.item.subItem ); function func ( obj ) { console.log( obj.item2.message ); } }); </script> </head> <body> </body> </html>