I missed last weeks class due to a sinus headache (hate them), so I didn’t have the benefit of giving Gina a blank look and saying things like, “I’m confused,” or “What was that again?” Or the one question I really want to ask after this assignment, or actually a question I started asking myself during Flash class today is, “I really need some more back ground on syntax.”
So I downloaded the pdf of Gina’s lecture, which she thankfully emailed to me, and low and behold, a good portion covered syntax, score. I also decided to put my data augering skills to work and googled, “JavaScript Syntax” and came across this site,and they had a tutorial on JavaScript Syntax. The great thing about this tutorial site, and Gina’s lecture, is that they both ended with creating an array.
What is an aray? To quote the tutorial,
An array is a grouping of objects that can be accessed through subscripts. At its simplest, an array can be thought of as a list.
Part of our homework assignment was to also create our own array, listing our 10 favorite movies. My array creates a variable named “FAV_MOVIES,” then I assigned values to the variable using [0] to [9]. I declared my variable, and its values in the header of my html document. Within the body tag, I set up 10 “document.write(FAV_MOVIES["#"]);” declarations(?). This is what my code looks like,
.
And this is what came out (it’s a very simple array, so all the words run into each other, but hey, it works, and I can ask question on how to fix that later),
All I have to say is, “Yay for me!”