Section 1

Preview this deck

Which of the following is the JavaScript escape character? A. " B. ' C. \ D. /

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (105)

Section 1

(50 cards)

Which of the following is the JavaScript escape character? A. " B. ' C. \ D. /

Front

C. \

Back

Which of the following is an arithmetic binary operator? A. + B. | | C. = D. &&

Front

A. +

Back

What organization oversees the development of web technology standards? A. U.S Department of Defense B. World Wide Web Consortium C. Stanford Unoveristy D. United Nations

Front

B. World Wide Web Consortium (W3C)

Back

A switch statement compares the value of an expression to a value contained in a(n) _____ . A. default label B. case label C. fallthrough D. break statement

Front

B. case label

Back

Which of the following creates a local variable A. Declaring it outside of a function with the var keyword B. Declaring it outside of a function without the var keyword C. Declaring it inside of a function with the var keyword D. Declaring it inside of a function without the var keyword

Front

C. Declaring it inside of a function with the var keyword.

Back

A simple if/else statement enables you to specify code for _____ alternatives. A. 2 B. 3 C. 4 D. unlimited

Front

A. 2

Back

Which type of error occurs when the interpreter fails to recognize code? A. Debugging B. Syntax C. Run-time D. Logic

Front

B. Syntax

Back

An if statement can include multiple statements provided that they _____ . A. execute after the if statement's closing semicolon B. are not contained within a command block C. do not include other if statements D. are contained within a command block

Front

D. are contained within a command block

Back

________ is a separate, complementary language to HTML that was developed for specifying the appearance of web page elements. A. XHTML B. SGML C. XML D. CSS

Front

D. CSS

Back

The markup language originally developed to create web pages and still in use today is called _______? A. HTML B. SGML C. XML D. CSS

Front

A. HTML (Hypertext Markup Language)

Back

When you assign a specific value to a variable on its creation, you ______ it. A. Declare B. Call C. Assign D. Initialize

Front

D. Initialize

Back

Which of the following describes JavaScript? A. Strongly Typed B. Statically Typed C. Loosely Typed D. Untyped

Front

C. Loosely Typed

Back

Which of the following is a valid JavaScript statement? A. document.write('Boston, MA is called 'Beantown.'') B. document.write("Boston,MA is called "Beantown."") C. document.write("Boston,MA is called 'Beantown."') D. document.write("Boston,MA is called 'Beantown.'")

Front

D. document.write("Boston, MA is called 'Beantown.'")

Back

A section of a document that is not interpreted as markup is referred to as _____ . A. PDATA B. CDATA C. PCDATA D. CPDATA

Front

B. CDATA

Back

Which of the following uses the correct case? A. Document.write() B. document.write() C. document.Write() D. Document.Write()

Front

B. document.write()

Back

A(n) _____ allows you to execute a related group of statements as a single unit. A. Variable B. Statement C. Event D. Function

Front

D. Function

Back

Which of the following properties returns the number of elements in an array? A. length B. size C. elements D. indexes

Front

A. length

Back

The statements in a(n) _____ statement always execute at least once. A. for B. do/while C. switch D. if

Front

B. do/while

Back

A system consisting of a client and a server is known as a ________. A. Mainframe Topology B. Double-System Architecture C. Two-Tier System D. Wide area network

Front

C. Two-Tier System

Back

Code that tells a browser what to do in response to a specific event on a specific element is called a(n) _______. A. Method B. Event Handler C. Response D. Procedure

Front

B. Event Handler

Back

What is usually the primary role of a client? A. Locating records that match a request B. Heavy processing, such as calculations C. Data Storage D. The presentation of an interface to the user

Front

D. The presentation of an interface to the user`

Back

A variable is declared outside a function is called a(n) _____ variable. A. Class B. Local C. Global D. Program

Front

C. Global

Back

Which method displays a dialog box with an OK button? A. document.write() B. document.writeIn() C. window.alert() D. window.popup()

Front

C. window.alert()

Back

Which of the following is a Boolean value? A. 3.04 B. true C. "Greece" D. 6.02e23

Front

B. true

Back

Elements that do not require a closing tag are called ______ elements. A. Independent B. Empty C. Permanent D. Constant

Front

B. Empty

Back

Which of the following is a concatenation operator? A. > B. + C. | | D. ++

Front

B. +

Back

Which of the following statements causes a syntax error? A. var firstName = ""; B. document.write(Availble points: " + availPoints); C. readyState = true; D. "use strict";

Front

B. document.write(Available points: " + availablePoints);

Back

What is the root element of an HTML document? A. Head B. Body C. HTML D. Script

Front

A. Head

Back

The _____ statement halts a looping statement and restarts the loop with a new iteration. A. restart B. continue C. break D. halt

Front

B. continue

Back

What is the result of the statement 5 < 4? A. 1 B. yes C. true D. false

Front

D. False

Back

Which of the following statements writes the value of the selection variable to the console? A. colsole.log("selection"); B. document.console("selection"); C. console.alert(selection); D. console.log(selection);

Front

D. console.log(selection);

Back

_____ errors are problems in the design of a program that prevent it from running as you anticipate. A. Application B. Syntax C. Logic D. Run-time

Front

C. Logic

Back

The _____ statement is equivalent to the conditional operator(?:). A. if B. if/else C. nested if D. switch

Front

B. if/else

Back

Which of the following creates an empty string? A. null B. undefined C. "" D. 0

Front

C. ""

Back

Parameters in a function definition are placed within _____ . A. Braces B. Parentheses C. Double Quotes D. Single Quotes

Front

B. parentheses

Back

If you do not include code that changes the counter value in a loop statement, your program will be caught in a(n) _____ . A. Iteration B. Condition C. Fall through D. Infinite loop

Front

D. Infinite Loop

Back

Which of the following is NOT a valid identifier? A. $InterestRate B. 2QInterest Rate C. interestRate D. _interestRate

Front

B. 2QInterest Rate

Back

Which characters are used to create a command block? A. ( ) B. [ ] C. { } D. <>

Front

C. { }

Back

Which of the following statements adds the value "oak" as the third element of the trees array? A. trees += "oak"; B. trees += "", "", "oak"; C. trees[2] = "oak"; D. trees[3]= "oak";

Front

C. trees[2] = "oak";

Back

Which of the following is an arithmetic unary operator? A. ++ B. | | C. = D. &&

Front

A. ++

Back

Which of the following is a primitive data type in JavaScript? A. Boolean B. Integer C. Floating-Point D. Logical

Front

A. Boolean

Back

A URL is a type of _____? A. Web Page B. URI C. Link D. Network

Front

C. Link

Back

When the value returned by a switch statement expression does not match a case label, then the statements within the _____ label execute. A. error B. else C. exception D. default

Front

D. default

Back

What is the correct syntax for creating an empty array named taxRules? A. var taxRules = {}; B. var taxRules; C. var taxRules = [ ]; D. var taxRules[5];

Front

C. var taxRules = [ ];

Back

Which of the following is an integer? A. -2.5 B. 6.02e23 C. -11 D. 0.0

Front

C. -11

Back

The parentheses at the start of a(n) _____ statement can include code that initializes a counter and changes its value with each iteration. A. while B. do C. do/while D. for

Front

D. For

Back

You track the progress of a loop with a(n) _____ . A. Counter B. Iteration C. Increment D. Decrement

Front

A. counter

Back

When is a for statement initialization expression executed? A. When the for statement begins executing B. With each repetition of the for statement C. When the counter variable is incremented D. When the for statement ends

Front

A. When the for statement begins executing.

Back

Which of the following functions does the processing tier NOT handle in a three-tier client/server system? A. Processing and Calculations B. Reading and writing of information to the data storage tier C. The return of any information to the client tier D. Data storage

Front

D. Data Storage

Back

When a JavaScript interpreter encounters a problem while a program is executing, that problem is called a(n) _____ error. A. application B. syntax C. logic D. run-time

Front

D. run-time

Back

Section 2

(50 cards)

Which method of the Math class rounds a value to the next lowest integer? A. floor() B. max() C. min() D. round()

Front

D. round()

Back

Which of the following is the correct syntax for accessing an element with the id value headline? A. document.getElementsByID("headline") B. document.getElementById("headline") C. document.getElementByID("headline") D. document.getElementById(headline)

Front

B. document.getElementById("headline")

Back

Which of the following is the correct syntax for accessing the value of the href attribute for the third a element in a document? A. document.getElementsByTagName("a") [2].href B. document.getElementsByTagName("a") [3].href C. document.getElementsByTagName("a").href D. document.getElementsByTagName("href") [3]

Front

A. document.getElementsByTagName("a") [2].href

Back

Which event do you use to call a function when a user selects a field or moves the insertion point into a field? A. blur B. focus C. input D. forminput

Front

B. focus

Back

In the browser object model, the History object is a _____ object to the Location object. A. parent B. grandparent C. sibling D. child

Front

C. sibling

Back

Which statement moves the browser to the top of the page? A. scroll(top) B. scroll(0,0) C. move(top) D. move(0,0)

Front

B. scroll(0,0)

Back

Which 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? A. blur B. focus C. click D. forminput

Front

A. blur

Back

Which Number method converts a number to a string using a specified number of decimal places? A. toFixed() B. toLocalString() C. toString() D. valueof()

Front

A. toFixed()

Back

The watch list in browser debugging tools lets you monitor the value of a(n) _____ during program execution. A. function B. exception handler C. expression D. statement

Front

C. expression

Back

To simulate the behavior of placeholder text in older browsers, you can instead set the value of the _____ property. A. src B. alt C. title D. value

Front

D. value

Back

For many fields that require numeric values, you can use JavaScript's built-in _____ function to determine whether the user actually entered a number. A.value() B. integer() C. isNumber() D. isNaN()

Front

D. isNaN()

Back

Which 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? A. novalidate B. min C. required D. max

Front

C. required

Back

A set of connected nodes that are NOT part of a document is known as a(n) _____ . A. history list B. node list C. HTML collection D. document fragment

Front

D. document fragment

Back

In object-oriented programming, a(n) _______ is a template, or blueprint, that serves as the basis for new objects. A. instance B. object C. method D. class

Front

D. class

Back

Which Number method converts a number to a string that is formatted with local numeric formatting style? A. toFixed() B. toLocalString() C. toString() D. valueof()

Front

B. toLocalString()

Back

Which of the following input type values triggers browser-based validation in modern browsers? A. password B. text C. radio D. number

Front

D. number

Back

The properties of which object describe a user's browser? A. History B. Location C. Navigator D. Screen

Front

C. Navigator

Back

How do you control a new window that you have created with JavaScript code?. A. You cannot control a new window with JavaScript code. B. Assign the new Window object created with the window.open() method to a variable. C. Use the name argument of the window.open() method. D. Use the name argument of the document.open() method.

Front

B. Assign the new Window object created with the window.open() method to a variable.

Back

Which of the following type values for the input element does NOT enable you to provide users with a limited set of choices? A. radio B. email C. checkbox D. range

Front

B. email

Back

After you throw an error, you use a(n) _____ statement to handle the error. A. try B. throw C. catch D. finally

Front

C. catch

Back

What do you assign to the value property of a text box to remove its contents? A. false B. true C. "" D. null

Front

C. ""

Back

Objects representing each of the controls in a form are stored in the _____ collection. A. forms B. controls C. inputs D. elements

Front

D. elements

Back

Which of the following modes temporarily suspends, or pauses, program execution so that you can monitor values and trace program execution? A. Suspend B. Step C. Break D. Continue

Front

C. Break

Back

Which of the following attributes triggers browser-based validation in modern browsers? A. max B. title C. alt D. src

Front

A. max

Back

Which of the following pieces of information is passed as an argument from a throw statement to a catch statement? A. Error number B. Error message C. Line number D. URL

Front

B. Error message

Back

What value of the selectedIndex property of a select object corresponds to no selection? A. -1 B. 0 C. q D. false

Front

A. -1

Back

Which command executes all statements in the next function in browser debugging tools? A. Step Out B. Step Over C. Step D. Step in/into

Front

B. Step Over

Back

Each item in the DOM tree is known as a _____ . A. node B. document C. object D. element

Front

A. node

Back

In _____ , some features are removed from the JS language, while other features require more stringent syntax. A. exception handling B. strict mode C. debugging tools D. debugger mode

Front

B. strict mode

Back

Which of the following properties has a value of true when a user has left a required field blank? A. required B. valueMissing C. patternMismatch D. typeMismatch

Front

B. valueMissing

Back

What is the primary reason for using any of the "to" methods if the Number class? A. To convert a number for use in calculations B. To format a date C. To perform calculations D. To convert a number that will be displayed to a user

Front

D. To convert a number that will be displayed to a user

Back

What method do you use to disable the default behavior for an event? A. preventDefault() B. checkValidity() C. select() D. getElementById()

Front

A. preventDefault()

Back

Which of the following statements creates an empty object with the name registry? A. var registry; B. var registry = {}; C. var registry = ""; D. var registry = [];

Front

B. var registry = {};

Back

Which of the following objects is also referred to as the global object? A. Browser object B. Screen object C. Document object D. Window object

Front

D. Window Object

Back

Which object allows you to change to a new, unvisited web page from within JavaScript code? A. History B. Location C. Navigator D. Screen

Front

B. Location

Back

Which of the following is the correct syntax for using the getElementsByTaglName() method to return all of the document's p elements? A. document.getElementsByTagName("<p>") B. document.getElementsByTagName("p") C. document.getElementsByTagName(<p>) D. document.getElementsByTagName() = ""

Front

B. document.getElementsByTagName("p")

Back

Which method allows you to insert a node at a position among its sibling nodes that you specify? A. createElement() B. appendChild() C. cloneNode() D. insertBefore()

Front

D. insertBefore()

Back

In object-oriented programming, a(n) _________ is an object that has been created from an existing template. A. instance B. property C. method D. class

Front

A. instance

Back

Which of the following Date class constructors creates a Date object that contains the current date and time from the local computer? A. Date() B. Date(milliseconds) C. Date(date_string) D. Date(year, month[, date, hours, minutes, seconds, milliseconds])

Front

A. Date()

Back

Which of the following parts of a date value are stored in a Date object using numeric representations, starting with zero, similar to an array? A. Day of the month B. Month C. Year D. AM/PM

Front

B. Month

Back

Which of the following exception handling code executes regardless of whether its associated try block throws an exception? A. throw "Please enter your last name."; B. catch(lNameError) { return false; } C. catch(lNameError) { window.alert(lNameError) return false; } D. finally { lNameValid = true; }

Front

D. finally { lNameValid = true; }

Back

What statement can you add to your code to effectively serve the same role as a breakpoint? A. break; B. breakpoint; C. debug; D. debugger;

Front

D. debugger;

Back

To make a window the active window, you use the _____ method of the Window object. A. focus () B. open () C. close () D. active ()

Front

A. focus ()

Back

Which method do you use to execute code only once after a specific amount of time has elapsed? A. setTimeout() B. setInterval() C. clearTimeout() D. clearInterval()

Front

A. setTimeout()

Back

Which of the following for statements is logically incorrect? A. for (var count = 10; count <= 0; count++) {document.write(count);} B. for (var count = 0; count <= 10: count++) {document.write (count); } C. for (var count = 10; count <= 0: count++) {document.write(count); } D. for (var count = 5; count <= 0: count++) {document.write(count); }

Front

A. for (var count = 10; count <= 0: count++) {document.write(count); }

Back

Which of the following attributes determines whether a check box or option button is selected? A. checked B. defaultChecked C. selected D. focus

Front

A. checked

Back

The _____ is the ordered list maintained by a JS processor containing all the procedures, such as functions, methods, or events, that have been called but have not yet finished processing. A. variables list B. watch list C. strict mode D. call stack

Front

D. call stack

Back

What is the correct syntax for rounding the number 39.75 to the nearest integer? A. new Match = round(39.75); B. var matchCalc = new Match(round(39.75)); C. Match.round(39.75); D. round(39.75);

Front

C. math.round(39.75);

Back

Which method do you use to execute code repeatedly, with a specific amount of time between each execution? A. setTimeout() B. setInterval() C. clearTimeout() D. clearInterval()

Front

B. setInterval()

Back

How do you increase the likelihood that a new window you create with the window.open() method will open as a new window rather than a new tab? A. Specify a window=true option B. Specify a height and/or a width value. C. Ensure the method is initiated by a user action. D. Close all open tabs in the user's browser.

Front

B. Specify a height and/or a width value

Back

Section 3

(5 cards)

A property whose value is itself an object is known as a(n) ______. A. sub-property B. instance C. constructor D. sub-object

Front

D. sub-object

Back

Which of the following statements adds a new property squreFeet to an object named RealEstate? A. var RealEstate.squareFeet; B.RealEstate.squareFeet = "" C. var squareFeed.RealEstate; D. squareFeet.RealEstate = "";

Front

D. squareFeet.RealEstate = "";

Back

Given the object definition var numbers = { founder: "Luis" }; which statement references the value of the founder property using an associative array? A. founder B. members.founder C. members["founder"] D. members[0]

Front

B. members.founder

Back

Which statement declares a method named calcTotal and sets its value to the existing calculateTotal() function? A. calcTotal: calculateTotal B. calcTotal: calculateTotal() C. calcTotal: function(calculateTotal) D. calcTotal: function(calculateTotal())

Front

A. calcTotal: calculateTotal

Back

The built-in property that specifies the constructor from which an object was extended is called the ________ property. A. default B. origination C. prototype D. source

Front

C. prototype

Back