Advertisement
winone1208

JS Object Initialization

Sep 6th, 2015
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <script type="text/javascript">
  4.     bucky = {name:"Bucky Roberts", age:24};
  5.     taylor = {name:"Taylor Swift", age:20};
  6. </script>
  7. </head>
  8. <body>
  9. <script type="text/javascript">
  10.  
  11. document.write(bucky.name + " loves " + taylor.name + " because she is " + taylor.age);
  12.  
  13. </script>
  14. </body>
  15. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement