Deck 9: Getting Started With Javascript

Full screen (f)
exit full mode
Question
Server-side and client-side programming are the two main types of web-based programming.
Use Space or
up arrow
down arrow
to flip the card.
Question
If no value is assigned to a Boolean variable,it is interpreted as having a value of true.
Question
A variable requires an initial value to be defined.
Question
An Infinity value is generated for an operation whose result is less than the smallest numeric value.
Question
JavaScript supports methodsto change the date stored within a Date object.
Question
In JavaScript,the clearTimeout()method is used to clear all repeated commands.
Question
A logical error is the easiest to fix as the errors in the code can be traced easily.
Question
JavaScript is case sensitive.
Question
The first character of a variable must be a numeral or an underscore character ( _ ).
Question
An object can be modified by changing its properties or by applying a method.
Question
JavaScript is a procedural language that needs a compiler to translate the code into machine language.
Question
Parameters are treated as variables within a function.
Question
The script element can be placed anywhere within the HTML document.
Question
Any command that references a document object before the browser has parsed the HTML code will result in an error because those objects do not yet reside in memory.
Question
There is no limit to the number of time-delayed commands a browser can process.
Question
The async attribute stalls script processing until after the page has been completely parsed and loaded.
Question
Both HTML tags and text content can be returned by the innerHTML property.
Question
JavaScript comments can be entered on single or multiple lines.
Question
JavaScript demands strict application of rules for syntax and program structure.
Question
The Math.round(x)method rounds the value of x down to the next lowest integer.
Question
A command that indicates an action for the browser to take should end with a _____.

A) ​semicolon
B) ​backslash
C) ​colon
D) ​forward slash
Question
_____ is the programming language for client-side programs.

A) ​Perl
B) ​JavaScript
C) ​C#
D) ​PHP
Question
Identify a shortcut key on the keyboard to open the debugging tools.

A) ​F9
B) ​F12
C) ​F8
D) ​F10
Question
Identify a command that displays a dialog box containing the message "Hello World!".

A) ​Window.alert("Hello World!");
B) ​Window.Alert("Hello World!");
C) ​window.alert("Hello World!");
D) ​window.Alert("Hello World!");
Question
JavaScript code is attached to an HTML file using the _____ element.

A) ​label
B) ​java
C) ​script
D) ​ attach
Question
_____ programming distributes the load to prevent a server from getting overloaded with program-related requests.

A) ​Client-side
B) ​Server-side
C) ​Inductive
D) ​Semantic
Question
_____ are intrinsic to the JavaScript language.

A) ​Built-in objects
B) ​Event-driven objects
C) ​Browser objects
D) ​Customized objects
Question
Developers advocate that JavaScript be run in _____ in which all lapses in syntax result in load-time or run-time errors.

A) ​protect mode
B) ​private mode
C) ​safe mode
D) ​strict mode
Question
_____ is the process of locating and fixing a programming error.

A) ​Scripting
B) ​Buffering
C) ​Debugging
D) ​Booting
Question
A video embedded on a web page is a(n)_____ and has properties such as source of the video file or the width and height of the video player.

A) ​class
B) ​method
C) ​object
D) ​event
Question
The isNaN(value)function returns a Boolean value of true if the value is not numeric.
Question
Which of the following is created by a programmer for use in an application.

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
Question
Identify a statement that is added to the first line of the file to run a script in strict mode.

A) ​"use strict";
B) ​"mode strict";
C) ​use: strict
D) ​mode: strict
Question
A _____ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser.

A) ​load-time error
B) ​run-time error
C) ​logical error
D) ​fatal error
Question
JavaScript is used as a programming tool for:

A) ​managing databases.
B) ​designing style sheets for websites.
C) ​creating interactive web forms and animated graphics.
D) ​providing virtual reality,diagnosis,and nonlinear controls.
Question
The technique for locating the source of an error is to set up _____,which are locations where the browser will pause the program,allowing the programmer to determine the error at that position.

A) ​breakpoints
B) ​thresholds
C) ​blocks
D) ​lapses
Question
To avoid fatal errors,it is advised to apply the _____ statement locally only to functions that are created rather than globally as the first line of the script file.

A) ​"use strict";
B) ​"use local";
C) ​"use global";
D) ​"use moderate";
Question
To break a text string into several lines,which means that the text string continues on the next line,the _____ character should be used.

A) ​forward slash
B) ​backslash
C) ​colon
D) ​semicolon
Question
A user can create an embedded script by removing the _____ attribute and placing all of the JavaScript code within the script element.

A) ​method
B) ​src
C) ​enctype
D) ​id
Question
The _____ attribute tells a browser to parse the HTML and JavaScript code together,only pausing to process the script before returning to the HTML file.

A) ​async
B) ​defer
C) ​src
D) ​type
Question
Identify a command that uses the dateDiv variable to refer the page element with ID dateNow.

A) ​var dateDiv = document.getElementById("dateNow");
B) ​var dateNow = document.getElementById(dateDiv),
C) ​var dateNow = document.getElementById("dateDiv");
D) ​ var dateDiv = document.getElementById(dateNow),
Question
The _____ property should be used only when no markup tags are involved.

A) ​innerHTML
B) ​outerHTML
C) ​textContent
D) ​insertAdjacentHTML
Question
Identify a return value for the expression 5/"A" using JavaScript.

A) ​5
B) ​NaN
C) ​Infinity
D) ​A
Question
A(n) _____ is a collection of commands that performs an action or returns a value.

A) ​function
B) ​argument
C) ​entity
D) ​pointer
Question
Identify the output of the following code.
Var x = 8;
Var y = 6;

A) ​56
B) ​48
C) ​28
D) ​96
Question
Which of the following syntax is used for a function to return a value?

A) ​return value;
Function_name(parameters){
Commands
}
B) ​function
Return value;
{
Function_name(parameters)
Commands
}
C) function function_name(parameters){
Commands
Return value;}
D) function_name(parameters)
{
Return value;
Commands
}
Question
Identify a method that repeatedly runs commands at specified time breaks in a function created.

A) ​setInterval("command",interval)
B) ​setTimeout("command",interval)
C) ​setTimeout(interval,delay)
D) ​setInterval(interval,delay)
Question
Identify an expression used to apply a method to an object.

A) ​object.object(method)
B) ​Object.name(method)
C) ​object.method(values)
D) ​Object.name(values)
Question
Identify a syntax to access any of the mathematical constants supported by the Math object.

A) ​math.constant
B) ​Math.CONSTANT
C) ​math.CONSTANT
D) ​Math.constant
Question
Identify a syntax for JavaScript function.

A) ​function_name function(parameters){
Commands
}

B) ​Function_name function(commands){
Parameters
}

C) ​function_name function(parameters){
Commands
}
D) ​Function function_name(commands){
Parameters
}
Question
Objects are organized into groups called _____.

A) ​object collections
B) ​object pools
C) ​object buckets
D) ​object topologies
Question
A(n)_____ is a named item in a program that stores a data value,such as a number or text string,or an object,such as a part of the web browser or browser window.

A) ​variable
B) ​entity
C) ​constant
D) ​class
Question
Identify an expression that can be used to refer an element by its id attribute.

A) ​document.getElementById(id)
B) ​Document.getElementbyID(id)
C) ​document.getelementById(id)
D) ​Document.getelementByID(id)
Question
The _____ attribute can be applied to the script element to ensure that an object can be referenced within a JavaScript program that runs only after the page has completed loading.

A) ​async
B) ​defer
C) ​charset
D) ​type
Question
Identify a property used to refer an HTML code that is stored within a page element.

A) ​element.innerHTML
B) ​element.textContent
C) ​element.offsetTop
D) ​element.insertAdjacentHTML
Question
A(n)_____ is any group of characters enclosed within either double or single quotation marks in JavaScript.

A) ​entity
B) ​text string
C) ​null value
D) ​object
Question
Which of the following can be referenced only after the browser has finished parsing the page content?

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
Question
Which of the following methods of the Math operator rounds x up to the next highest integer?

A) ​Math.round(x)
B) ​Math.ceil(x)
C) ​Math.rand(x)
D) ​Math.floor(x)
Question
Identify a syntax to set the time-delayed commands.

A) ​SettimeOut(delay);
B) ​Setinterval(interval);
C) ​setTimeout("command",delay);
D) ​setInterval("command",interval);
Question
Identify an expression that defines a date object.

A) ​new Date("month,day,year hrs:mins:secs");
B) ​new Date("month day,year" "hrs:mins:secs");
C) ​new Date("month day,year hrs:mins:secs");
D) ​new Date("month,day,year" hrs:mins:secs);
Question
Document objects are organized in hierarchical structures called the _________.
Question
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Terin wants to create an object that will contain information about the browser application.Which of the following objects must Terin create to accomplish this?

A) navigator object
B) location object
C) history object
D) document object
Question
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Identify an expression that Robin must use to define the current date on the web page.

A) new Date(year,month,day,hrs,mins,secs);
B) new date("hrs","mins","secs","day","month","year");
C) this.day(hrs,mins,secs,year,month,day),
D) this Day("day","month","hrs","mins","secs","year"),
Question
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
Identify the value for the month that will be displayed on the web page by using thisDay.getMonth()method.

A) -35
B) -4
C) -14
D) -3
Question
When writing an HTML code,changing the value of the _________ property overwrites whatever content is currently contained within the selected object.
Question
A _________ is a JavaScript command that is run after a specified amount of time has passed.
Question

Identify the property that best matches the following style rules.

-It is indicated by the - - symbol,which reduces the operand's value by 1.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Question

Identify the property that best matches the following style rules.

-It is a command to create a dialog box containing a message.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Question

Identify the property that best matches the following style rules.

-It is an object collection in which all the elements are marked with the < a > tag.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Question
The _________ error occurs when a script is first loaded by a browser.
Question
The variables or expressions that operators act upon are called _________.
Question
The browser halts loading a script before trying to execute it if a(n)_________ is detected.
Question
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
He also includes the method thisDay.getDay()in the code.What is the result for the given method?

A) 1
B) 3
C) 4
D) 5
Question
JavaScript includes _________ in its time calculations due to which the seconds value in the countdown clock is off by a second.
Question

Identify the property that best matches the following style rules.

-It returns a text string displaying value to n significant digits either to the left or to the right of the decimal point.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Question
Identify a function that extracts the first numeric value from the text string.

A) ​parseInt(string)
B) ​parseFloat(string)
C) ​isFinite(value)
D) ​isNaN(value)
Question
JavaScript dates are stored as numeric values equal to the number of _________ between the specified date and January 1,1970 at midnight.
Question
A(n)_________ is an entity within the browser or web page that has properties that define it and methods that can be acted upon it.
Question
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Identify an object created by Terin that will contain information about the current URL.

A) history object
B) screen object
C) ocation object
D) navigator object
Question
A(n)_________ can be created by omitting the src attribute and placing all of the JavaScript code within the script element so that an external file need not be used.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/89
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 9: Getting Started With Javascript
1
Server-side and client-side programming are the two main types of web-based programming.
True
2
If no value is assigned to a Boolean variable,it is interpreted as having a value of true.
False
3
A variable requires an initial value to be defined.
False
4
An Infinity value is generated for an operation whose result is less than the smallest numeric value.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
5
JavaScript supports methodsto change the date stored within a Date object.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
6
In JavaScript,the clearTimeout()method is used to clear all repeated commands.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
7
A logical error is the easiest to fix as the errors in the code can be traced easily.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
8
JavaScript is case sensitive.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
9
The first character of a variable must be a numeral or an underscore character ( _ ).
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
10
An object can be modified by changing its properties or by applying a method.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
11
JavaScript is a procedural language that needs a compiler to translate the code into machine language.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
12
Parameters are treated as variables within a function.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
13
The script element can be placed anywhere within the HTML document.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
14
Any command that references a document object before the browser has parsed the HTML code will result in an error because those objects do not yet reside in memory.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
15
There is no limit to the number of time-delayed commands a browser can process.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
16
The async attribute stalls script processing until after the page has been completely parsed and loaded.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
17
Both HTML tags and text content can be returned by the innerHTML property.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
18
JavaScript comments can be entered on single or multiple lines.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
19
JavaScript demands strict application of rules for syntax and program structure.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
20
The Math.round(x)method rounds the value of x down to the next lowest integer.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
21
A command that indicates an action for the browser to take should end with a _____.

A) ​semicolon
B) ​backslash
C) ​colon
D) ​forward slash
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
22
_____ is the programming language for client-side programs.

A) ​Perl
B) ​JavaScript
C) ​C#
D) ​PHP
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
23
Identify a shortcut key on the keyboard to open the debugging tools.

A) ​F9
B) ​F12
C) ​F8
D) ​F10
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
24
Identify a command that displays a dialog box containing the message "Hello World!".

A) ​Window.alert("Hello World!");
B) ​Window.Alert("Hello World!");
C) ​window.alert("Hello World!");
D) ​window.Alert("Hello World!");
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
25
JavaScript code is attached to an HTML file using the _____ element.

A) ​label
B) ​java
C) ​script
D) ​ attach
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
26
_____ programming distributes the load to prevent a server from getting overloaded with program-related requests.

A) ​Client-side
B) ​Server-side
C) ​Inductive
D) ​Semantic
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
27
_____ are intrinsic to the JavaScript language.

A) ​Built-in objects
B) ​Event-driven objects
C) ​Browser objects
D) ​Customized objects
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
28
Developers advocate that JavaScript be run in _____ in which all lapses in syntax result in load-time or run-time errors.

A) ​protect mode
B) ​private mode
C) ​safe mode
D) ​strict mode
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
29
_____ is the process of locating and fixing a programming error.

A) ​Scripting
B) ​Buffering
C) ​Debugging
D) ​Booting
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
30
A video embedded on a web page is a(n)_____ and has properties such as source of the video file or the width and height of the video player.

A) ​class
B) ​method
C) ​object
D) ​event
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
31
The isNaN(value)function returns a Boolean value of true if the value is not numeric.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
32
Which of the following is created by a programmer for use in an application.

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
33
Identify a statement that is added to the first line of the file to run a script in strict mode.

A) ​"use strict";
B) ​"mode strict";
C) ​use: strict
D) ​mode: strict
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
34
A _____ occurs after a script has been successfully loaded with no syntax errors and is being executed by a browser.

A) ​load-time error
B) ​run-time error
C) ​logical error
D) ​fatal error
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
35
JavaScript is used as a programming tool for:

A) ​managing databases.
B) ​designing style sheets for websites.
C) ​creating interactive web forms and animated graphics.
D) ​providing virtual reality,diagnosis,and nonlinear controls.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
36
The technique for locating the source of an error is to set up _____,which are locations where the browser will pause the program,allowing the programmer to determine the error at that position.

A) ​breakpoints
B) ​thresholds
C) ​blocks
D) ​lapses
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
37
To avoid fatal errors,it is advised to apply the _____ statement locally only to functions that are created rather than globally as the first line of the script file.

A) ​"use strict";
B) ​"use local";
C) ​"use global";
D) ​"use moderate";
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
38
To break a text string into several lines,which means that the text string continues on the next line,the _____ character should be used.

A) ​forward slash
B) ​backslash
C) ​colon
D) ​semicolon
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
39
A user can create an embedded script by removing the _____ attribute and placing all of the JavaScript code within the script element.

A) ​method
B) ​src
C) ​enctype
D) ​id
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
40
The _____ attribute tells a browser to parse the HTML and JavaScript code together,only pausing to process the script before returning to the HTML file.

A) ​async
B) ​defer
C) ​src
D) ​type
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
41
Identify a command that uses the dateDiv variable to refer the page element with ID dateNow.

A) ​var dateDiv = document.getElementById("dateNow");
B) ​var dateNow = document.getElementById(dateDiv),
C) ​var dateNow = document.getElementById("dateDiv");
D) ​ var dateDiv = document.getElementById(dateNow),
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
42
The _____ property should be used only when no markup tags are involved.

A) ​innerHTML
B) ​outerHTML
C) ​textContent
D) ​insertAdjacentHTML
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
43
Identify a return value for the expression 5/"A" using JavaScript.

A) ​5
B) ​NaN
C) ​Infinity
D) ​A
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
44
A(n) _____ is a collection of commands that performs an action or returns a value.

A) ​function
B) ​argument
C) ​entity
D) ​pointer
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
45
Identify the output of the following code.
Var x = 8;
Var y = 6;

A) ​56
B) ​48
C) ​28
D) ​96
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
46
Which of the following syntax is used for a function to return a value?

A) ​return value;
Function_name(parameters){
Commands
}
B) ​function
Return value;
{
Function_name(parameters)
Commands
}
C) function function_name(parameters){
Commands
Return value;}
D) function_name(parameters)
{
Return value;
Commands
}
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
47
Identify a method that repeatedly runs commands at specified time breaks in a function created.

A) ​setInterval("command",interval)
B) ​setTimeout("command",interval)
C) ​setTimeout(interval,delay)
D) ​setInterval(interval,delay)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
48
Identify an expression used to apply a method to an object.

A) ​object.object(method)
B) ​Object.name(method)
C) ​object.method(values)
D) ​Object.name(values)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
49
Identify a syntax to access any of the mathematical constants supported by the Math object.

A) ​math.constant
B) ​Math.CONSTANT
C) ​math.CONSTANT
D) ​Math.constant
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
50
Identify a syntax for JavaScript function.

A) ​function_name function(parameters){
Commands
}

B) ​Function_name function(commands){
Parameters
}

C) ​function_name function(parameters){
Commands
}
D) ​Function function_name(commands){
Parameters
}
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
51
Objects are organized into groups called _____.

A) ​object collections
B) ​object pools
C) ​object buckets
D) ​object topologies
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
52
A(n)_____ is a named item in a program that stores a data value,such as a number or text string,or an object,such as a part of the web browser or browser window.

A) ​variable
B) ​entity
C) ​constant
D) ​class
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
53
Identify an expression that can be used to refer an element by its id attribute.

A) ​document.getElementById(id)
B) ​Document.getElementbyID(id)
C) ​document.getelementById(id)
D) ​Document.getelementByID(id)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
54
The _____ attribute can be applied to the script element to ensure that an object can be referenced within a JavaScript program that runs only after the page has completed loading.

A) ​async
B) ​defer
C) ​charset
D) ​type
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
55
Identify a property used to refer an HTML code that is stored within a page element.

A) ​element.innerHTML
B) ​element.textContent
C) ​element.offsetTop
D) ​element.insertAdjacentHTML
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
56
A(n)_____ is any group of characters enclosed within either double or single quotation marks in JavaScript.

A) ​entity
B) ​text string
C) ​null value
D) ​object
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
57
Which of the following can be referenced only after the browser has finished parsing the page content?

A) ​Built-in objects
B) ​Browser objects
C) ​Document objects
D) ​Customized objects
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
58
Which of the following methods of the Math operator rounds x up to the next highest integer?

A) ​Math.round(x)
B) ​Math.ceil(x)
C) ​Math.rand(x)
D) ​Math.floor(x)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
59
Identify a syntax to set the time-delayed commands.

A) ​SettimeOut(delay);
B) ​Setinterval(interval);
C) ​setTimeout("command",delay);
D) ​setInterval("command",interval);
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
60
Identify an expression that defines a date object.

A) ​new Date("month,day,year hrs:mins:secs");
B) ​new Date("month day,year" "hrs:mins:secs");
C) ​new Date("month day,year hrs:mins:secs");
D) ​new Date("month,day,year" hrs:mins:secs);
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
61
Document objects are organized in hierarchical structures called the _________.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
62
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Terin wants to create an object that will contain information about the browser application.Which of the following objects must Terin create to accomplish this?

A) navigator object
B) location object
C) history object
D) document object
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
63
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Identify an expression that Robin must use to define the current date on the web page.

A) new Date(year,month,day,hrs,mins,secs);
B) new date("hrs","mins","secs","day","month","year");
C) this.day(hrs,mins,secs,year,month,day),
D) this Day("day","month","hrs","mins","secs","year"),
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
64
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
Identify the value for the month that will be displayed on the web page by using thisDay.getMonth()method.

A) -35
B) -4
C) -14
D) -3
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
65
When writing an HTML code,changing the value of the _________ property overwrites whatever content is currently contained within the selected object.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
66
A _________ is a JavaScript command that is run after a specified amount of time has passed.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
67

Identify the property that best matches the following style rules.

-It is indicated by the - - symbol,which reduces the operand's value by 1.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
68

Identify the property that best matches the following style rules.

-It is a command to create a dialog box containing a message.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
69

Identify the property that best matches the following style rules.

-It is an object collection in which all the elements are marked with the < a > tag.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
70
The _________ error occurs when a script is first loaded by a browser.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
71
The variables or expressions that operators act upon are called _________.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
72
The browser halts loading a script before trying to execute it if a(n)_________ is detected.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
73
Robin maintains a web page for updating the metro timings in the city. He would like the website to display the present day’s schedule. To do this, Robin writes a code that includes an object to retrieve the day of the week and then loads the appropriate data into the page.



-Robin includes an expression to the code,
 var this Day = new Date ("May 23, 2018 14:35:05"); \text { var this Day = new Date ("May 23, } 2018 \text { 14:35:05"); }
He also includes the method thisDay.getDay()in the code.What is the result for the given method?

A) 1
B) 3
C) 4
D) 5
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
74
JavaScript includes _________ in its time calculations due to which the seconds value in the countdown clock is off by a second.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
75

Identify the property that best matches the following style rules.

-It returns a text string displaying value to n significant digits either to the left or to the right of the decimal point.

A) window.alert(" ");
B) value.toPrecision(n)
C) collection[idref]
D) element.outerHTML
E) document.anchors
F) element.textContent
G) Decrement operator
H) Run-time error
I) value.toFixed(n)
J) parseInt(string)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
76
Identify a function that extracts the first numeric value from the text string.

A) ​parseInt(string)
B) ​parseFloat(string)
C) ​isFinite(value)
D) ​isNaN(value)
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
77
JavaScript dates are stored as numeric values equal to the number of _________ between the specified date and January 1,1970 at midnight.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
78
A(n)_________ is an entity within the browser or web page that has properties that define it and methods that can be acted upon it.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
79
Terin has created a page for a training institute that will allow users to browse the training courses provided at the institute. Terin uses JavaScript to write the content using objects and functions. The objects defined in the code are document object, history object, screen object, navigator object, and the location object.

-Identify an object created by Terin that will contain information about the current URL.

A) history object
B) screen object
C) ocation object
D) navigator object
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
80
A(n)_________ can be created by omitting the src attribute and placing all of the JavaScript code within the script element so that an external file need not be used.
Unlock Deck
Unlock for access to all 89 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 89 flashcards in this deck.