Deck 6: Introducing Javascript

Full screen (f)
exit full mode
Question
A JavaScript condition will always consist of two statements separated by a relational operator.____________________
Use Space or
up arrow
down arrow
to flip the card.
Question
It is easy for a Web browser to detect whether a particular Web page contains embedded JavaScript code.The person who creates the document should use the < string> tag to mark the beginning of a JavaScript section.____________________
Question
With JavaScript,the browser will convert the script into its equivalent machine-readable form called ____ code.

A) primary
B) secondary
C) binary
D) sequential
Question
Programming languages must be converted from a human-readable form to a machine-readable form by a specialized piece of software called a ____.

A) binary code
B) method
C) compiler
D) programmer
Question
It would be easier to enter the code that can display simple static text messages in a browser using HTML than to use the JavaScript document.write()method to display the same text messages.
Question
Strictly speaking,the rules of JavaScript syntax require a semicolon at the end of each line.
Question
A meaningless sequence of gibberish or cryptic symbols can also be a string.
Question
The primary purpose of JavaScript is to generate text that will be inserted into the standard ____ text stream.

A) HTTP
B) HTML
C) FTP
D) TCP/IP
Question
When working with a compiler,the ____ controls the conversion process of turning human-readable code into a machine-readable form.

A) browser
B) programmer
C) source program
D) target program
Question
JavaScript is sometimes referred to as a programming language,but it is more accurate to call it a ____ language.

A) scripting
B) helper
C) sequence
D) process
Question
If using the else keyword in a JavaScript if statement,the else keyword appears immediately after the statement block of the if clause and is accompanied by a statement block of its own.
Question
A string is limited to 256 characters.
Question
The syntax of the conditional statement in JavaScript is very important.The statement begins with the keyword if,and then a condition is specified within a pair of parentheses.____________________
Question
In JavaScript,the opening curly brace ( { )indicates the beginning of a statement block,and the closing brace ( } )marks the end of that block.
Question
If you make the mistake of entering HTML tags within a JavaScript code block,your browser will still display them without error.
Question
HTML tags do not conform to the rules of JavaScript syntax;therefore,the JavaScript interpreter cannot process them.
Question
Once the condition has been evaluated,either the if statement block or the else statement block will be executed,or both.
Question
JavaScript is undoubtedly the most widely used technology on the World Wide Web.
Question
If the result of the condition is true,the else block will run.____________________
Question
Method names are always followed by a parameter list,even though the list is sometimes empty.____________________
Question
Case 6-2
Daniel is writing JavaScript code to see if the person visiting his Web site is using Microsoft Internet Explorer.
In the context of this case,and the code written below,
(navigator.appName == "Microsoft Internet Explorer")
The term navigator can be used interchangeably with the term ____.

A) browser
B) Microsoft Internet Explorer
C) appName
D) Name
Question
The bar at the bottom of the browser window that displays messages is called the ____ line.

A) status
B) help
C) alert
D) command
Question
The JavaScript method ____ simply inserts a string of characters into the standard HTML text stream.

A) document.write()
B) document.text()
C) document.stream()
D) document.window()
Question
A keyword is recognized as part of the ____ definition.

A) language
B) method
C) property
D) parameter
Question
In 1978,two employees of Bell Laboratories,Brian Kernighan and Dennis Ritchie,published a book titled The C Programming Language,and started the tradition to display the phrase ____.

A) "Hello,World!"
B) "Hello,USA!"
C) "Hello,Friend!"
D) "Hello Out There!"
Question
FIGURE 6-1
<strong>FIGURE 6-1   Referring to Figure 6-1 above,the operators shown in the chart are often part of a JavaScript ____.</strong> A) method B) property C) parameter list D) condition <div style=padding-top: 35px>
Referring to Figure 6-1 above,the operators shown in the chart are often part of a JavaScript ____.

A) method
B) property
C) parameter list
D) condition
Question
When working with JavaScript,always place the ____ directly below the keyword to which it belongs.

A) opening brace
B) closing brace
C) property name
D) method name
Question
The syntax of the parameter list consists of an opening parenthesis,____ or more parameter items,and a closing parenthesis.

A) zero
B) one
C) two
D) three
Question
The purpose of the ____ method is to allow a JavaScript program to display a special dialog box that will notify the user that an unexpected event has occurred or that some kind of user input is required.

A) notice()
B) message()
C) alert()
D) warning()
Question
Case 6-1
Kate is new at her company, and has found some existing JavaScript that she would like to use on the company's Web site.
In the JavaScript below,Kate discovers that the lines labeled "input 1;input 2;and input 3;" are called the ____.
If (< blank>)
{
Input 1;
Input 2;
Input 3;
}

A) variables
B) statements
C) constants
D) operators
Question
Case 6-2
Daniel is writing JavaScript code to see if the person visiting his Web site is using Microsoft Internet Explorer.
The condition being evaluated in this JavaScript code fragment from Daniel's site is:
(navigator.appName == "Microsoft Internet Explorer")
In this case,you are utilizing the appName ____ of the navigator object to determine the application name of the current Web browser.

A) method
B) application
C) object
D) property
Question
____ is an example of a JavaScript keyword.

A) If
B) Else
C) Return
D) all of the above
Question
In the context of HTML and JavaScript,a(n)____________________ is nothing more than a sequence of one or more characters.
Question
When working with JavaScript,always place the closing brace so that it is ____ with its corresponding opening brace.

A) horizontally aligned
B) vertically aligned
C) centered
D) right justified
Question
The JavaScript if statement supports an optional ____ clause,which defines the action to take if the specified condition is not true.

A) when
B) else
C) yet
D) then
Question
FIGURE 6-1
<strong>FIGURE 6-1   Referring to Figure 6-1,the table shows ____ operators.</strong> A) process B) relational C) absolute D) standard <div style=padding-top: 35px>
Referring to Figure 6-1,the table shows ____ operators.

A) process
B) relational
C) absolute
D) standard
Question
When working with JavaScript,always ____ contained within the statement block.

A) highlight comments
B) capitalize tags
C) italicize the HTML
D) indent the statements
Question
____ is considered to be the JavaScript default object,which means it is not necessary to use its name explicitly.

A) Script
B) Value
C) Name
D) Window
Question
Case 6-1
Kate is new at her company, and has found some existing JavaScript that she would like to use on the company's Web site.
In the JavaScript below,Kate realizes that the first line "if (< blank>)" is called the ____.
If (< blank>)
{
Input 1;
Input 2;
Input 3;
}

A) link
B) condition
C) clause
D) operator
Question
JavaScript objects contain ____ that programmers can access to obtain information about the object.

A) properties
B) methods
C) lists
D) syntax strings
Question
Explain the history of Java and JavaScript.Which came first? How are they related to each other? Would you rather have worked on the development of Java or the development of JavaScript? Why?
Question
The alert()method is part of an object called ____________________.
Question
A token can either be a variable name (such as x or count)or a literal ____________________ (such as 10 or "hello").
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
The line-by-line conversion process of scripts that occurs automatically at run time
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
Specific rules of grammar in the Javascript language
Question
JavaScript is essentially made up of a number of invisible entities called ____________________ that contain a well-defined set of capabilities.
Question
A(n)____________________ is a user-defined name for a memory location whose value can change over time.
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
JavaScript programmers call upon the services of one or more of these specialized functions that are within objects
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
Provides the method with the information it needs to perform its function correctly
Question
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
Gives programmers the ability to evaluate a specific condition and then perform different actions depending on the results of that evaluation
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/50
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 6: Introducing Javascript
1
A JavaScript condition will always consist of two statements separated by a relational operator.____________________
False
tokens
2
It is easy for a Web browser to detect whether a particular Web page contains embedded JavaScript code.The person who creates the document should use the < string> tag to mark the beginning of a JavaScript section.____________________
False
script
< script>
3
With JavaScript,the browser will convert the script into its equivalent machine-readable form called ____ code.

A) primary
B) secondary
C) binary
D) sequential
C
4
Programming languages must be converted from a human-readable form to a machine-readable form by a specialized piece of software called a ____.

A) binary code
B) method
C) compiler
D) programmer
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
5
It would be easier to enter the code that can display simple static text messages in a browser using HTML than to use the JavaScript document.write()method to display the same text messages.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
6
Strictly speaking,the rules of JavaScript syntax require a semicolon at the end of each line.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
7
A meaningless sequence of gibberish or cryptic symbols can also be a string.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
8
The primary purpose of JavaScript is to generate text that will be inserted into the standard ____ text stream.

A) HTTP
B) HTML
C) FTP
D) TCP/IP
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
9
When working with a compiler,the ____ controls the conversion process of turning human-readable code into a machine-readable form.

A) browser
B) programmer
C) source program
D) target program
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
10
JavaScript is sometimes referred to as a programming language,but it is more accurate to call it a ____ language.

A) scripting
B) helper
C) sequence
D) process
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
11
If using the else keyword in a JavaScript if statement,the else keyword appears immediately after the statement block of the if clause and is accompanied by a statement block of its own.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
12
A string is limited to 256 characters.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
13
The syntax of the conditional statement in JavaScript is very important.The statement begins with the keyword if,and then a condition is specified within a pair of parentheses.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
14
In JavaScript,the opening curly brace ( { )indicates the beginning of a statement block,and the closing brace ( } )marks the end of that block.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
15
If you make the mistake of entering HTML tags within a JavaScript code block,your browser will still display them without error.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
16
HTML tags do not conform to the rules of JavaScript syntax;therefore,the JavaScript interpreter cannot process them.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
17
Once the condition has been evaluated,either the if statement block or the else statement block will be executed,or both.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
18
JavaScript is undoubtedly the most widely used technology on the World Wide Web.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
19
If the result of the condition is true,the else block will run.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
20
Method names are always followed by a parameter list,even though the list is sometimes empty.____________________
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
21
Case 6-2
Daniel is writing JavaScript code to see if the person visiting his Web site is using Microsoft Internet Explorer.
In the context of this case,and the code written below,
(navigator.appName == "Microsoft Internet Explorer")
The term navigator can be used interchangeably with the term ____.

A) browser
B) Microsoft Internet Explorer
C) appName
D) Name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
22
The bar at the bottom of the browser window that displays messages is called the ____ line.

A) status
B) help
C) alert
D) command
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
23
The JavaScript method ____ simply inserts a string of characters into the standard HTML text stream.

A) document.write()
B) document.text()
C) document.stream()
D) document.window()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
24
A keyword is recognized as part of the ____ definition.

A) language
B) method
C) property
D) parameter
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
25
In 1978,two employees of Bell Laboratories,Brian Kernighan and Dennis Ritchie,published a book titled The C Programming Language,and started the tradition to display the phrase ____.

A) "Hello,World!"
B) "Hello,USA!"
C) "Hello,Friend!"
D) "Hello Out There!"
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
26
FIGURE 6-1
<strong>FIGURE 6-1   Referring to Figure 6-1 above,the operators shown in the chart are often part of a JavaScript ____.</strong> A) method B) property C) parameter list D) condition
Referring to Figure 6-1 above,the operators shown in the chart are often part of a JavaScript ____.

A) method
B) property
C) parameter list
D) condition
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
27
When working with JavaScript,always place the ____ directly below the keyword to which it belongs.

A) opening brace
B) closing brace
C) property name
D) method name
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
28
The syntax of the parameter list consists of an opening parenthesis,____ or more parameter items,and a closing parenthesis.

A) zero
B) one
C) two
D) three
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
29
The purpose of the ____ method is to allow a JavaScript program to display a special dialog box that will notify the user that an unexpected event has occurred or that some kind of user input is required.

A) notice()
B) message()
C) alert()
D) warning()
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
30
Case 6-1
Kate is new at her company, and has found some existing JavaScript that she would like to use on the company's Web site.
In the JavaScript below,Kate discovers that the lines labeled "input 1;input 2;and input 3;" are called the ____.
If (< blank>)
{
Input 1;
Input 2;
Input 3;
}

A) variables
B) statements
C) constants
D) operators
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
31
Case 6-2
Daniel is writing JavaScript code to see if the person visiting his Web site is using Microsoft Internet Explorer.
The condition being evaluated in this JavaScript code fragment from Daniel's site is:
(navigator.appName == "Microsoft Internet Explorer")
In this case,you are utilizing the appName ____ of the navigator object to determine the application name of the current Web browser.

A) method
B) application
C) object
D) property
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
32
____ is an example of a JavaScript keyword.

A) If
B) Else
C) Return
D) all of the above
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
33
In the context of HTML and JavaScript,a(n)____________________ is nothing more than a sequence of one or more characters.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
34
When working with JavaScript,always place the closing brace so that it is ____ with its corresponding opening brace.

A) horizontally aligned
B) vertically aligned
C) centered
D) right justified
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
35
The JavaScript if statement supports an optional ____ clause,which defines the action to take if the specified condition is not true.

A) when
B) else
C) yet
D) then
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
36
FIGURE 6-1
<strong>FIGURE 6-1   Referring to Figure 6-1,the table shows ____ operators.</strong> A) process B) relational C) absolute D) standard
Referring to Figure 6-1,the table shows ____ operators.

A) process
B) relational
C) absolute
D) standard
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
37
When working with JavaScript,always ____ contained within the statement block.

A) highlight comments
B) capitalize tags
C) italicize the HTML
D) indent the statements
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
38
____ is considered to be the JavaScript default object,which means it is not necessary to use its name explicitly.

A) Script
B) Value
C) Name
D) Window
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
39
Case 6-1
Kate is new at her company, and has found some existing JavaScript that she would like to use on the company's Web site.
In the JavaScript below,Kate realizes that the first line "if (< blank>)" is called the ____.
If (< blank>)
{
Input 1;
Input 2;
Input 3;
}

A) link
B) condition
C) clause
D) operator
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
40
JavaScript objects contain ____ that programmers can access to obtain information about the object.

A) properties
B) methods
C) lists
D) syntax strings
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
41
Explain the history of Java and JavaScript.Which came first? How are they related to each other? Would you rather have worked on the development of Java or the development of JavaScript? Why?
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
42
The alert()method is part of an object called ____________________.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
43
A token can either be a variable name (such as x or count)or a literal ____________________ (such as 10 or "hello").
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
44
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
The line-by-line conversion process of scripts that occurs automatically at run time
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
45
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
Specific rules of grammar in the Javascript language
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
46
JavaScript is essentially made up of a number of invisible entities called ____________________ that contain a well-defined set of capabilities.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
47
A(n)____________________ is a user-defined name for a memory location whose value can change over time.
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
48
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
JavaScript programmers call upon the services of one or more of these specialized functions that are within objects
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
49
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
Provides the method with the information it needs to perform its function correctly
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
50
MATCHING
Identify the letter of the choice that best matches the phrase or definition.
a.Methods
b.Parameter list
c.Conditional statement
d.Interpretation
e.Syntax
Gives programmers the ability to evaluate a specific condition and then perform different actions depending on the results of that evaluation
Unlock Deck
Unlock for access to all 50 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 50 flashcards in this deck.