REVIEW QUESTIONS - Centennial College
REVIEW QUESTIONSChapter 1Quiz 1A web page is identified by a unique address called the ____.Answer: Uniform Resource Locator or URLA student may display a web page on his or her computer screen using a program called a(n) ____.Answer: web browserTrue or False: HTML documents are text documents.Answer: TrueTrue or False: A tag pair and any data it contains are referred to as a script.Answer: FalseThe <head> element and the elements it contains are referred to as the ____.Answer: document headAn application that is capable of retrieving and processing HTML and XHTML documents is called a(n) ____.Answer: user agent, or browser____ refers to the visual design and creation of the documents that appear on the World Wide Web.Answer: Web page design or Web design____ refers to the creation and assembly of the tags, attributes, and data that make up a web page.Answer: Web page authoring or Web authoring____ refers to the design of software applications for a website.Answer: Web development or Web programmingTrue or False: The web is built on a three-tier client/server system.Answer: FalseTrue or False: JavaScript is a client-side scripting language that allows web page authors to develop interactive web pages and sites.Answer: TrueQuiz 2The values a program stores in computer memory are commonly called ____.Answer: variablesThe name you assign to a variable is called a(n) ____.Answer: identifierReserved words are also called ____.Answer: keywordsTrue or False: Identifiers must begin with an ASCII letter.Answer: FalseTrue or False: The plus sign (+) is called the assignment operator.Answer: FalseTrue or False: JavaScript is case sensitive.Answer: TrueWhen placed in the document ____, JavaScript code is processed before the main body of the document is displayed.Answer: headTrue or False: Script sections create the information that is displayed beneath the <h2> heading elements.Answer: TrueTrue or False: To access JavaScript code that is saved in an external file, a programmer uses the js attribute of the <script> element.Answer: FalseA(n) ____ is a program that checks whether a web page is well formed.Answer: validating parserTrue or False: A section of a document that is not interpreted as markup is referred to as character data, or CDATA.Answer: TrueChapter 2Quiz 1The lines of code that make up a function are called the ____.Answer: function definitionSending arguments to the parameters of a called function is called ____.Answer: passing argumentsA(n) ____ statement is a statement that returns a value to the statement that called the function.Answer: returnA(n) ____ variable is one that is declared outside a function and is available to all parts of your program.Answer: globalA(n) ____ variable is one that is declared inside a function and is only available within the function in which it is declared.Answer: localQuiz 2A(n) ____ is the specific category of information that a variable contains.Answer: data typeA(n) ____ is a positive or negative number with no decimal places.Answer: integerTrue or False: Empty strings are valid values for literal strings.Answer: TrueTrue or False: You can use the compound assignment operator (+=) to combine two strings.Answer: TrueIn JavaScript, the escape character is the ____.Answer: backslash (\)When you combine the escape character with other characters, the combination is called a(n) ____.Answer: escape sequenceChapter 3Quiz 1 1. True or False: The numbering of elements within an array starts with an index number of zero (0). Answer: True 2. A(n) ____ is an element’s numeric position within the array. Answer: index 3. True or False: JavaScript requires that all of the elements in an array be of the exact same data type. Answer: False 4. True or False: After you have assigned a value to an array element, you can change it later. Answer: True 5. The ____ property returns the number of elements in an array. Answer: lengthQuiz 2 1. Each repetition of a looping statement is called a(n) ____. Answer: iteration 2. In a(n) ____, a loop statement never ends because its conditional expression is never false. Answer: infinite loop 3. The ____ statement executes a statement or statements once, and then repeats the execution as long as a given conditional expression evaluates to true. Answer: do/while 4. True or False: The for statement is used for repeating a statement or series of statements as long as a given conditional expression evaluates to true. Answer: True 5. You use the ____ statement when you want to stop the loop for the current iteration, but want the loop to continue with a new iteration. Answer: continue Chapter 4Quiz 1 1. ____ errors occur when the interpreter fails to recognize code. Answer: Syntax 2. A(n) ____ error is a flaw in a program’s design that prevents the program from running as anticipated. Answer: logic 3. The first line of defense in locating bugs in JavaScript programs are the ____ received when the JavaScript interpreter encounters a syntax or run-time error. Answer: error messages 4. True or False: A run-time error can be caused by a syntax error. Answer: True 5. The rule of thumb in testing browsers is that if a browser is used by more than ____ percent of the market, a programmer should write and debug his or her JavaScript programs for that browser. Answer: one or 1Quiz 2 1. True or False: Using the console.log() method requires opening a separate browser window. Answer: False 2. ____ is the examination of individual statements in an executing program. Answer: Tracing 3. The ____ method provides one of the most useful ways to trace JavaScript code. Answer: window.alert() 4. A(n) ____ is a simplified, temporary program that is used for testing functions and other code. Answer: driver program 5. True or False: A programmer can combine techniques to aid in searching for errors. Answer: True6. True or False: Only initialized variables are displayed in the variables list in browser debugging tools. Answer: False 7. The ____ option executes all remaining code in the current function. Answer: stepping out 8. The ____ command executes an individual line of code and then pauses until the programmer instructs the debugger to continue. Answer: step into 9. The ____ option allows a programmer to skip function calls when debugging. Answer: stepping over 10. The term ____ refers to the order in which procedures, such as functions, methods, or event handlers, execute in a program. Answer: call stack Chapter 5Quiz 1 1. The browser object model (BOM) is also called the ____, and is a hierarchy of objects that provides programmatic access to different aspects of the web browser window or web page. Answer: client-side object model 2. The ____ object is arguably the most important object in the browser object model because it represents the web page displayed in a browser. Answer: Document 3. The Document object branch of the browser object model is represented by its own object model called the ____. Answer: Document Object Model (DOM) Document Object Model DOM 4. True or False: The DOM tree of all web pages is the same. Answer: False Quiz 2 1. The ____ method returns a node list or HTML collection of elements with a name attribute that matches a specified value. Answer: getElementsByName() 2. The ____ method returns the first element in a document with a matching id attribute. Answer: getElementById() 3. True or False: In general, a programmer should use the innerHTML property instead of the textContent property. Answer: False 4. The ____ method closes a web browser window. Answer: close() 2. The ____ method is used in JavaScript to execute code after a specific amount of time has elapsed. Answer: setTimeout() 5. The ____ method is used to cancel a setTimeout() method before its code executes. Answer: clearTimeout() 6. The ____ method is similar to the setTimeout() method, except that it repeatedly executes the same code after being called only once. Answer: setInterval() 7. The ____ method is used to clear a setInterval() method call. Answer: clearInterval()Chapter 6More information on current browser utilization may be found at: information on current browser utilization may be found at: representing each of the controls in a form are stored in the _____ collection.formscontrolsinputselementsWhich of the following type values for the input element does not enable you to provide users with a limited set of choices?radioemailcheckboxrangeWhat value of the selectedIndex property of a select object corresponds to no selection?-101falseTo simulate the behavior of placeholder text in older browsers, you can instead set the value of the _______ property.srcalttitlevalueWhich event do you use to call a function when a user selects a field or moves the insertion point into a field?blurfocusinputforminputWhich event do you use to call a function when a field is no longer selected, or a user moves the insertion point to a different field?blurfocusclickforminputWhich of the following attributes determines whether a check box or option button is selected?checkeddefaultCheckedselectedfocusWhat do you assign to the value property of a text input box to remove its content?falsetrue""nullWhich of the following attributes triggers browser-based validation in modern browsers?maxtitlealtsrcWhich of the following input type values triggers browser-based validation in modern browsers?passwordtextradionumberWhich of the following properties has a value of true when a user has left a required field blank?requiredvalueMissingpatternMismatchtypeMismatchWhich of the following attributes for form child elements would you use for a field that must have a value before the form can be submitted?novalidateminrequiredmaxWhat method do you use to disable the default behavior for an event?preventDefault()checkValidity()select()getElementById()Which statement moves the browser to the top of the page?scroll(top)scroll(0,0)move(top)move(0,0)For any fields that require numeric values, you can use JavaScript’s built-in ________ function to determine whether the user actually entered a number.value()integer()isNumber()isNaN()Explain how to transfer the contents of one field to another field.You look up the value property of the source field and assign it to the value property for the target field.What is the purpose of the novalidate attribute?The novalidate attribute toggles off validation of a form when added to the opening <form> tag.Explain how the validity object of the constraint validation API is used for checking the validity of form data.The validity object contains several properties; if all of these properties have a value of false, then the value of the validity object is true.Explain how to check if any option button in a set is selected.To check if an option button is selected, you access the value of its checked property. To check if none of the option buttons in a set are selected, you can create a conditional statement using And (&&) operators. This code could check if the first button is not selected (using the ! operator), and (&&) if the second button is not selected, etc. If all of those conditions are true, the if statement is true, meaning that no button is checked.Explain how to check if a user’s entry is a number.For any fields that require numeric values, you can use JavaScript’s built-in isNaN() function to determine whether the user actually entered a number. Recall from Chapter 2 that the isNaN() function determines whether a value is the special value NaN (not a number). The isNaN() function returns a value of true if it is passed a value that is not a number; if passed a value that is a number, the function returns a value of false. ................
................
In order to avoid copyright disputes, this page is only a partial summary.
To fulfill the demand for quickly locating and searching documents.
It is intelligent file search solution for home and business.
Related download
- html forms javascript and cascading style sheets
- javascript writing into html output weebly
- javascript is the scripting language of the web
- javascript is sometimes referred to as a programming
- review questions centennial college
- javascript pace university
- more advanced web page development some introductory
- html tom kleen
- lecture 6 javascript 3
Related searches
- performance review questions and answers
- employee review questions for managers
- performance review questions for managers
- annual review questions for managers
- chapter 3 review questions answers
- chapter 2 review questions and answers
- performance review questions examples
- openstax psychology review questions answers
- annual review questions and answers
- peer review questions to ask
- self review questions and answers
- employee review questions for employee