978-0133577396 Chapter 17

subject Type Homework Help
subject Pages 5
subject Words 1037
subject Authors Lawrence Snyder

Unlock document.

This document is partially blurred.
Unlock all pages and 1 million more documents.
Get Access
page-pf1
Fluency with Information Technology, 6e (Snyder)
Chapter 17 Fundamental Concepts Expressed in JavaScript: Get with the Program
17.1 True/False Questions
1) In programming, names for values are called variables.
2) The letter sequence that makes up a variable name is called a label.
3) In JavaScript, variables must be declared at the top of the program.
4) A JavaScript variable cannot be initialized in the same statement in which it is declared.
5) The statement terminator in JavaScript is the colon (:).
6) In JavaScript, strings must be enclosed by single (') or double (") quotes.
7) A Boolean value can be either true or false.
8) The flow of an assignment is always right to left.
9) Relational operators cannot be used on strings.
10) The outcome of a relational expression is always true or false.
page-pf2
11) The <then-statement> of an if statement only executes when the predicate is true.
12) The closing curly brace of a compound statement does not end with a semicolon.
13) When the <Boolean expression> of an if/else statement is false, the <else-statement> of the
expression is executed.
14) Adele Koss, one of the first professional programmers, stressed that one of the most
challenging aspects of writing a program is devising an elegant solution.
15) When defining a variable you must also initialize it.
16) When three statements, when wrapped inside a pair of curly brackets, suddenly becomes one
statement.
17) The statement x = x + 1; makes no sense, since x cannot equal x + 1.
1) Programming languages are most helpful to programmers because they:
A) are precise
B) are very close to English
C) allow for only a single possible solution for a problem
D) automate the process of writing a program
2) From language to language, generally an identifier:
A) can be made up of only letters
B) cannot contain numbers, spaces, or lowercase letters
C) starts with a letter and is followed by letters, numerals, or the underscore
D) starts with two digits followed by letters or numbers
page-pf3
3) Which of the following is a valid JavaScript variable name?
A) 0123
B) 37AB
C) BR549
D) Tax Rate
4) In JavaScript, the escape symbol is the:
A) slash (/)
B) backslash (\)
C) colon (:)
D) semicolon (;)
5) Which of the following is not a suitable assignment statement?
A) wages = hours * rate
B) length * width = area
C) class = "College Algebra"
D) score = 92.8
6) The value used for each variable on the right side of an assignment statement is:
A) the value before the assigned variable is changed
B) the value after the the assigned variable is changed
C) can be updated before the newly_computed_value is assigned to the
variable_receiving_new_value
D) none of the above
7) In JavaScript, 17%5 is:
A) the name of a variable
B) 2
C) 3
D) the same as 17/5
page-pf4
8) That last thing in an if statement is
A) the word end
B) a semicolon (;)
C) a right curly brace (})
D) either a semicolon (;) or a right curly brace (})
9) In JavaScript, an empty string:
A) contains a single space enclosed in double quotes
B) is not valid
C) is the same as an undefined value
D) is written as ""
10) String constants or string literals:
A) are stored in memory with the surrounding quotes or double quotes
B) are surrounded by quotes in JavaScript code
C) can't include a tab character
D) all of the above
11) In JavaScript, the + sign represents
A) addition
B) string concatenation
C) either addition or string concatenation, depending on the types of the values it is used with
D) none of the above
1) ________ is a relatively new programming language used for Web applications.
2) In programming, a(n) ________ is used to change the value of a variable.
3) The word ________ is the JavaScript declaration command used to create a variable.
4) The angle brackets (< >) used to describe the syntax of a programming command are called
________.
5) Different kinds of values for variables are called ________.
page-pf5
6) The assignment symbol in JavaScript is ________.
7) ________ is the relational operator symbol for "equal to".
8) ________ is the logical AND operator in JavaScript.
9) ________ is the logical OR operator in JavaScript.
10) A ________ value is a sequence of keyboard characters.
11) The letter sequence that makes up a variable's name is called the ________.
12) ________ is the act of formulating an algorithm or program.
13) ________ are memory locations in the computer.

Trusted by Thousands of
Students

Here are what students say about us.

Copyright ©2022 All rights reserved. | CoursePaper is not sponsored or endorsed by any college or university.