Javascript examples for Language Basics:Introduction
JavaScript supports the notion of objects.
<!DOCTYPE HTML> <html> <head> <title>Example</title> </head> <body> <script type="text/javascript"> var myData = new Object(); myData.name = "Joe"; myData.topic = "raining"; document.writeln("Hello " + myData.name + ". "); document.writeln("Today is " + myData.topic + "."); </script> </body> </html>/*from www . j ava 2 s .c o m*/