Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

CSCI 2910 JavaScript Syntax Quiz - Spring 2007 - Prof. David L. Tarnoff, Quizzes of Computer Science

A javascript syntax quiz from a university course taken in spring 2007. The quiz covers various topics such as the location of javascript code, termination characters, conditional execution, loops, escape characters, and case sensitivity. Students are expected to answer multiple-choice questions related to these topics.

Typology: Quizzes

Pre 2010

Uploaded on 08/16/2009

koofers-user-ka3
koofers-user-ka3 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download CSCI 2910 JavaScript Syntax Quiz - Spring 2007 - Prof. David L. Tarnoff and more Quizzes Computer Science in PDF only on Docsity! Name: ________________________________ CSCI 2910 JavaScript Syntax Quiz Spring 2007 1. In which of the following locations can JavaScript code be placed? Circle all that apply. a.) In the head of an XHTML file b.) In a separate text file c.) In the body of an XHTML file d.) As an attribute of an XHTML tag e.) After the </body> tag of an XHTML file 2. Each line of a JavaScript program must be terminated with the character _______. a.) / b.) > c.) # d.) < e.) ~ f.) . g.) ; h.) : 3. Modify the code below so that browsers that do not support JavaScript will ignore the code. <script language="javascript" type="text/javascript"> document.writeln("<h1>Hello, World!</h1>"); </script> 4. How many times will the code inside the following for-loop be executed? ___________ for (i = 0; i < 10; i = i +3) document.writeln("i = " + i + "\n"); 5. The \n in the previous question represents an escape character that outputs a carriage return. Give another example of an escape character along with the expected output. Escape character: ______________ Expected output: ____________ 6. True or false: JavaScript is case sensitive. 7. Name one of the benefits discussed in class of an interpreted language. 8. Name one of the drawbacks discussed in class of an interpreted language. 9. For each of the lines of JavaScript code below, place a single underline beneath the objects, place a double underline beneath the attributes (properties), circle the methods, and put brackets, [ ], around the events. history.length; onClick="window.alert('You found it!');"
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved