• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 5. JavaScript Arrays and Escape ... > Creating an Array in a Hurry!

Creating an Array in a Hurry!

Here is a much faster way to create the exact same array that you have in the previous example—this time, all in one line:


<html>
<head>
<title>A Simple Page</title>
<script language="JavaScript">
<!-- Cloaking device on!
var days_of_week = new Array("Sunday","Monday","Tuesday","Wednesday","Thursday", "Friday","Saturday");
// Cloaking device off -->
</script>
</head>
<body>

</body>
</html>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint