COM271, Week 8
Introduction to Javascript
Syllabus | Table of Pages | Assignments | References and Useful Links
←Review, Week 7 |
Review, Week 9→
Answer these questions by reviewing the notes for week 8. It is permitted to work on these questions in class.
- List four ways to include javascript on a web page (use actual code). (4 points)
- 1—
- 2—
- 3—
- 4—
- 1—
- Define and illustrate "event handler":
- Define event and give one example using the correct javascript event
- Define handler and illustrate with one example of what a handler would do when triggered by the event
- What four qualities do all javascript variables share? (4 points)
- 1—
- 2—
- 3—
- 4—
- 1—
- Explain the difference between a javascript assignment operator (e.g., x=3;) and a javascript comparison operator (e.g., if(x==3)...).
- Write a conditional ("if") statement that resets the value of the variable x to zero if x becomes greater than or equal to 10.
These questions are worth one point each. Grades for each question are 0 or 1 (no partial credit). Total points this review: 10. At the end of the course, total points will be added, divided by 100, and that fraction will be applied to 20% of your grade (maximum points from reviews is 20% of grade). See Assignments and Grading.