Cañalita Wad 1 M4
Cañalita Wad 1 M4
Cañalita Wad 1 M4
Self-Assessment 1 (10pts).
The problem with global variables is that since every function has access to these, it becomes
increasingly hard to figure out which functions actually read and write these variables. To understand
how the application works, you pretty much have to take into account every function which modifies the
global state.
Self-Assessment 2 (10pts).
Document.getElementById(“main”)
- Returns an Element object representing the element whose id property matches the specified
string.
Self-Assessment 3 (10pts).
Document.body.style.backgroundColor = “papayawhip”
Activity 1 (10pts)
Write what the alert message will say for each of these examples:
a. Alert( myArray[0] );
// Alert “1”
// Alert “1two”
// Alert “2”
Activity 2 (10pts)
a. Var foo = 5;
Foo += 5;
Alert( foo );
b. Var foo = 2;
} else {