Deck 2: The Javascript Language

Full screen (f)
exit full mode
Question
A register is a short-term memory location in the processor.
Use Space or
up arrow
down arrow
to flip the card.
Question
The second generation of programming languages came to be known as "high-level" languages because statements could be expressed more closely to the way people think than the way the computer "thinks."
Question
FORTRAN is considered a first-generation language.
Question
The Java language was enhanced in the 1980s to incorporate object-oriented programming (OOP).
Question
Interpreted programs can be modified and tested immediately.
Question
JavaScript is considered an interpreted language because it is interpreted by a Web browser.
Question
JavaScript is embedded in an HTML file and interpreted by a Web browser, such as Mozilla Firefox, Internet Explorer, Google Chrome, or Safari.
Question
4GLs are associated with visual interfaces and natural languages in some definitions.
Question
Machine code is compiled into bytecode by a just-in-time compiler.
Question
Fourth-generation languages are "application specific"-that is, they are tied to an application such as a database or a report writer.
Question
Mosaic was released in 1995, Netscape Navigator in 2000, and Microsoft Internet Explorer in 2002.
Question
JavaScript was first known as Mocha.
Question
HTML uses a system of tags to identify sections of a Web page.
Question
E-mail and File Transfer Protocol (FTP) are two applications that use the Internet as their principal medium.
Question
Credit for the development of JavaScript goes to Bill Gates of Microsoft Corporation.
Question
JavaScript programs are compiled and run separately as standalone programs.
Question
A principle of XHTML is that it contains the content of data and leaves the formatting specifics to external documents, such as Cascading Style Sheets (CSS).
Question
In object-based programming, a statement is often made up of two parts: the name of the object initiating an action (such as document) and the action itself.
Question
In pseudocode, the keyword Display is followed by the text expression. In JavaScript, the document.write is followed by the text expression in parentheses, and a semicolon is placed at the end of the statement.
Question
JavaScript, like most full programming languages, requires the declaration of a data type.
Question
JavaScript has no separate declaration for constants, so constants are declared as variables.
Question
Named constants should be used when they serve to improve readability and understanding.
Question
A number entered in a text box is stored as a numeric variable.
Question
An expression using the + operator between two variables assigned with the prompt() statement concatenates the variables as strings instead of performing arithmetic addition on them.
Question
In JavaScript, variables are declared with var and the data type must be specified.
Question
____ consisted of machine languages, written in binary code and executed by the computer's processor.

A) First-generation languages
B) Second-generation languages
C) Third-generation languages
D) Fourth-generation languages
Question
With a(n) ____ the editor, compiler, and executer are combined in the same application.

A) graphical browser
B) second-generation language
C) integrated development environment
D) first-generation language
Question
Complete programs that are translated into complete machine-executable programs are said to be ____.

A) interpreted
B) compiled
C) instantiated
D) validated
Question
____ was one of the first languages to have an integrated development environment (IDE).

A) Visual Basic
B) FORTRAN
C) LISP
D) COBOL
Question
Which of the following is considered a second generation language?

A) FORTRAN
B) LISP
C) C
D) Assembly language
Question
Programs translated and executed line by line from the source code are said to be ____.

A) compiled
B) validated
C) interpreted
D) instantiated
Question
____ programs are free of syntax errors and they run faster than interpreted programs (because they are already in machine executable form).

A) Validated
B) Compiled
C) Assembled
D) Instantiated
Question
____ focus less on a program's procedures and more on the objects (or things) on which these procedures operate.

A) Validated
B) Compiled
C) Assembled
D) Object oriented
Question
If a(n) ____ program contains a syntax error it usually just halts or crashes.

A) validated
B) compiled
C) interpreted
D) object oriented
Question
A(n) ____ is one that does not run as a separate (stand-alone) program.

A) second-generation language
B) scripting language
C) first-generation language
D) interpreted language
Question
____ are segments of program code that another program runs.

A) Scripts
B) Tags
C) Hyperlinks
D) Methods
Question
In the early 1990s, search tools with the names Archie, Gopher, Veronica, and Jughead established the use of ____, which made it possible to click a text link and retrieve a document from another location in the vast Internet resources known as "cyberspace."

A) hyperlinks
B) tags
C) functions
D) objects
Question
In 1989, ____ developed Hypertext Markup Language (HTML), which became the language of the modern Internet, and Hypertext Transfer Protocol (HTTP), which specified how communication should take place.

A) Bill Gates
B) Tim Berners-Lee
C) IBM
D) Larry Page
Question
____ is a markup language, meaning it describes the layout of a Web page onscreen.

A) Java
B) HTML
C) C++
D) Visual Basic
Question
The collection of HTML pages stored, transmitted, and displayed on the Internet is known as the ____.

A) URL
B) graphical browser
C) World Wide Web
D) Hypertext Transfer Protocol
Question
A computer that stores and sends out Web pages on the Internet is called a ____.

A) Web server
B) client
C) DNS
D) database
Question
The Web browser on the user's computer that receives Web pages is called the ____.

A) server
B) hyperlink
C) tag
D) client
Question
Which of the following tags is needed to set up a section for writing JavaScript?

A) <html>
<body>
<script type="text/javascript">

B) <html>
<body>
<script type="javascript">

C) <html>
<script type="text/javascript">

D) html
Body
Script type="javascript"
Question
XHTML includes the capability of ____ code, meaning it can be checked for correctness.

A) validating
B) compiling
C) interpreting
D) instantiating
Question
The JavaScript function for receiving input is ____.

A) Declare
B) prompt()
C) var
D) document.write()
Question
The syntax of the assignment statement that calls the prompt() function is ____.

A) variableName = prompt("optional default value");
B) variableName = ("prompt text","optional default value");
C) variableName = prompt("prompt text","optional default value");
D) variableName = "prompt text";
Question
A ____ is a code module that returns a value.

A) variable
B) parameter
C) function
D) hyperlink
Question
Based on the code below, which of the following is the empty string?
// prompt for employee's last name
Var lastName = prompt("Enter the employee's last name:","");

A) var lastName
B) ""
C) prompt
D) "Enter the employee's last name:"
Question
Which of the following statements outputs the following?
This is line 1.
This is line 2.

A) document.write("This is line 1.");
Document.write("This is line 2.");

B) var BR = "<br />";
Document.write("This is line 1." "BR");
Document.write("This is line 2." "BR");

C) document.write"This is line 1.";
Document.write"This is line 2.";

D) var BR = "<br />";
Document.write("This is line 1." + BR);
Document.write("This is line 2." + BR);
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/49
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 2: The Javascript Language
1
A register is a short-term memory location in the processor.
True
2
The second generation of programming languages came to be known as "high-level" languages because statements could be expressed more closely to the way people think than the way the computer "thinks."
False
3
FORTRAN is considered a first-generation language.
False
4
The Java language was enhanced in the 1980s to incorporate object-oriented programming (OOP).
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
5
Interpreted programs can be modified and tested immediately.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
6
JavaScript is considered an interpreted language because it is interpreted by a Web browser.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
7
JavaScript is embedded in an HTML file and interpreted by a Web browser, such as Mozilla Firefox, Internet Explorer, Google Chrome, or Safari.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
8
4GLs are associated with visual interfaces and natural languages in some definitions.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
9
Machine code is compiled into bytecode by a just-in-time compiler.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
10
Fourth-generation languages are "application specific"-that is, they are tied to an application such as a database or a report writer.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
11
Mosaic was released in 1995, Netscape Navigator in 2000, and Microsoft Internet Explorer in 2002.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
12
JavaScript was first known as Mocha.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
13
HTML uses a system of tags to identify sections of a Web page.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
14
E-mail and File Transfer Protocol (FTP) are two applications that use the Internet as their principal medium.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
15
Credit for the development of JavaScript goes to Bill Gates of Microsoft Corporation.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
16
JavaScript programs are compiled and run separately as standalone programs.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
17
A principle of XHTML is that it contains the content of data and leaves the formatting specifics to external documents, such as Cascading Style Sheets (CSS).
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
18
In object-based programming, a statement is often made up of two parts: the name of the object initiating an action (such as document) and the action itself.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
19
In pseudocode, the keyword Display is followed by the text expression. In JavaScript, the document.write is followed by the text expression in parentheses, and a semicolon is placed at the end of the statement.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
20
JavaScript, like most full programming languages, requires the declaration of a data type.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
21
JavaScript has no separate declaration for constants, so constants are declared as variables.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
22
Named constants should be used when they serve to improve readability and understanding.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
23
A number entered in a text box is stored as a numeric variable.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
24
An expression using the + operator between two variables assigned with the prompt() statement concatenates the variables as strings instead of performing arithmetic addition on them.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
25
In JavaScript, variables are declared with var and the data type must be specified.
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
26
____ consisted of machine languages, written in binary code and executed by the computer's processor.

A) First-generation languages
B) Second-generation languages
C) Third-generation languages
D) Fourth-generation languages
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
27
With a(n) ____ the editor, compiler, and executer are combined in the same application.

A) graphical browser
B) second-generation language
C) integrated development environment
D) first-generation language
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
28
Complete programs that are translated into complete machine-executable programs are said to be ____.

A) interpreted
B) compiled
C) instantiated
D) validated
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
29
____ was one of the first languages to have an integrated development environment (IDE).

A) Visual Basic
B) FORTRAN
C) LISP
D) COBOL
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
30
Which of the following is considered a second generation language?

A) FORTRAN
B) LISP
C) C
D) Assembly language
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
31
Programs translated and executed line by line from the source code are said to be ____.

A) compiled
B) validated
C) interpreted
D) instantiated
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
32
____ programs are free of syntax errors and they run faster than interpreted programs (because they are already in machine executable form).

A) Validated
B) Compiled
C) Assembled
D) Instantiated
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
33
____ focus less on a program's procedures and more on the objects (or things) on which these procedures operate.

A) Validated
B) Compiled
C) Assembled
D) Object oriented
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
34
If a(n) ____ program contains a syntax error it usually just halts or crashes.

A) validated
B) compiled
C) interpreted
D) object oriented
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
35
A(n) ____ is one that does not run as a separate (stand-alone) program.

A) second-generation language
B) scripting language
C) first-generation language
D) interpreted language
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
36
____ are segments of program code that another program runs.

A) Scripts
B) Tags
C) Hyperlinks
D) Methods
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
37
In the early 1990s, search tools with the names Archie, Gopher, Veronica, and Jughead established the use of ____, which made it possible to click a text link and retrieve a document from another location in the vast Internet resources known as "cyberspace."

A) hyperlinks
B) tags
C) functions
D) objects
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
38
In 1989, ____ developed Hypertext Markup Language (HTML), which became the language of the modern Internet, and Hypertext Transfer Protocol (HTTP), which specified how communication should take place.

A) Bill Gates
B) Tim Berners-Lee
C) IBM
D) Larry Page
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
39
____ is a markup language, meaning it describes the layout of a Web page onscreen.

A) Java
B) HTML
C) C++
D) Visual Basic
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
40
The collection of HTML pages stored, transmitted, and displayed on the Internet is known as the ____.

A) URL
B) graphical browser
C) World Wide Web
D) Hypertext Transfer Protocol
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
41
A computer that stores and sends out Web pages on the Internet is called a ____.

A) Web server
B) client
C) DNS
D) database
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
42
The Web browser on the user's computer that receives Web pages is called the ____.

A) server
B) hyperlink
C) tag
D) client
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
43
Which of the following tags is needed to set up a section for writing JavaScript?

A) <html>
<body>
<script type="text/javascript">

B) <html>
<body>
<script type="javascript">

C) <html>
<script type="text/javascript">

D) html
Body
Script type="javascript"
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
44
XHTML includes the capability of ____ code, meaning it can be checked for correctness.

A) validating
B) compiling
C) interpreting
D) instantiating
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
45
The JavaScript function for receiving input is ____.

A) Declare
B) prompt()
C) var
D) document.write()
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
46
The syntax of the assignment statement that calls the prompt() function is ____.

A) variableName = prompt("optional default value");
B) variableName = ("prompt text","optional default value");
C) variableName = prompt("prompt text","optional default value");
D) variableName = "prompt text";
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
47
A ____ is a code module that returns a value.

A) variable
B) parameter
C) function
D) hyperlink
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
48
Based on the code below, which of the following is the empty string?
// prompt for employee's last name
Var lastName = prompt("Enter the employee's last name:","");

A) var lastName
B) ""
C) prompt
D) "Enter the employee's last name:"
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
49
Which of the following statements outputs the following?
This is line 1.
This is line 2.

A) document.write("This is line 1.");
Document.write("This is line 2.");

B) var BR = "<br />";
Document.write("This is line 1." "BR");
Document.write("This is line 2." "BR");

C) document.write"This is line 1.";
Document.write"This is line 2.";

D) var BR = "<br />";
Document.write("This is line 1." + BR);
Document.write("This is line 2." + BR);
Unlock Deck
Unlock for access to all 49 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 49 flashcards in this deck.