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 Part 3 Quiz - Spring 2006 - Prof. David L. Tarnoff, Quizzes of Computer Science

A javascript quiz from a university course, csci 2910, taken in spring 2006. The quiz covers various topics such as creating custom objects, constructor functions, the string object, and the date object. It includes multiple-choice questions and true or false statements.

Typology: Quizzes

2009/2010

Uploaded on 02/25/2010

koofers-user-lws
koofers-user-lws 🇺🇸

10 documents

1 / 1

Toggle sidebar

Related documents


Partial preview of the text

Download CSCI 2910 JavaScript Part 3 Quiz - Spring 2006 - Prof. David L. Tarnoff and more Quizzes Computer Science in PDF only on Docsity! Name: ________________________________ CSCI 2910 JavaScript Part 3 Quiz Spring 2006 1. True or False: In order to create a new custom object, the JavaScript programmer simply needs to create the constructor function where the function name is the name of the object being defined. 2. True or False: A constructor function has a special format to distinguish it from a normal function. 3. True or False: The new operator is the only way to call a constructor. 4. The keyword ______ is used to identify the current instance being created by the constructor. a.) object b.) isself c.) here d.) getself e.) id f.) this g.) my 5. The property of the String object that returns the number of characters in the string is: a.) length b.) count c.) countof d.) numchar e.) chars f.) index g.) array 6. The purpose of the String object function split(delimiter) is to: a.) join an array of strings with delimiter defining the character to occur between each string. b.) return an array of integers defining the index of each location in the string where the delimiter was found. c.) divide a string into two substrings at the first place the delimiter is encountered. d.) divide a string into substrings at each occurrence of a delimiter and return an array containing the resulting substrings. 7. True or False: All numeric constants must be declared as instances of the Number object. 8. True or False: The Number object method toString() can be used to convert to different bases, e.g., binary, hex, decimal, etc. 9. True or False: The Date object constructor date1 = new Date(1139936700000); can be used to create an instance of the Date object initialized to 1139936700000 milliseconds since 01/01/1970. 10. In order to have access to the object properties and methods inherent to an HTML element, we have to declare an object instance to refer to the HTML element. This is done with the __________________ method. a.) getHTMLObject() b.) getHTMLElement() c.) getWebElement() d.) getElementById() e.) elementToInstance() f.) accessHTMLElement() 11. Convert the following CSS property names to their corresponding JavaScript Property names: font-family border-left-color 12. Circle all of the following characteristics that are true of layers. a.) Layers can be placed at exact x and y positions. b.) Two layers can occupy the same level. c.) Layers can overlap. d.) Transparent elements can have other elements showing through. e.) Layers are well supported by most browsers that support JavaScript. f.) Built in support exists allowing a user to click-n-drag a layer to a new x and y position.
Docsity logo



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