Shared Flashcard Set

Details

Javascript
Javascript Intro
56
Computer Science
Undergraduate 1
04/22/2009

Additional Computer Science Flashcards

 


 

Cards

Term
The version attribute of the script tag can be used to specify which version of JavaScript is being used.
Definition
False
Term
The version of JavaScript being used in an XHTML document can be specified by using the __________ attribute.
Definition
language
Term
The individual lines within a program are called __________.
Definition
statements
Term
An XHTML document that uses an external JavaScript source file must use the __________ attribute of the script tag to define the location of the file.
Definition
src
Term
The "+=" assignment operator can be used to combine strings as well as numbers.
Definition
True
Term
The expression, rtnvalue = 4 + 2 * 8; will return a value of 48 to rtnvalue.
Definition
False
Term
JavaScript __________ words cannot be used to define a variable name.
Definition
reserved or key
Term
Data types that can be assigned only a single value, such as an integer, or Boolean value, are called __________ types.
Definition
primitive
Term
A programming language that does not require or allow you to declare a variables data type is a(n) __________ programming language.
Definition
loosely-typed or loosely typed or dynamic typing
Term
The plus sign (+) which means addition, the asterisk (*) which represents multiplication, and the forward slash (/) which represents division, are all examples of __________ operators.
Definition
arithmetic
Term
A(n) __________ operator requires an operand on the left and the right side of the operator.
Definition
binary
Term
A JavaScript interpreter will not attempt to convert string values to numbers when using the __________ operator.
Definition
addition
Term
The __________ operator returns the opposite value of an operand.
Definition
negation or - -
Term
The "+=", "*=", and "%=" operators are all examples of __________ operators.
Definition
assignment
Term
The priority that determines what sequence expressions are evaluated is the operator __________.
Definition
precedence
Term
A procedure is called a function in JavaScript.
Definition
True
Term
While it is good programming practice to always use unique variable names, it is valid to have variables in one function defined with the same name as variables in another function.
Definition
True
Term
A function should always be created within the __________ section of an XHTML document.
Definition
head
Term
The variable __________ determines where a variable can be referenced or used within a program.
Definition
scope
Term
The ... element is used to create a(n) __________ to a text or graphic link within a document.
Definition
anchor
Term
The __________ method can be called to display the dialog box
Definition
prompt
Term
A URL within an XHTML document that refers to a specific drive and directory of an XHTML document is a(n) __________ URL.
Definition
absolute
Term
When a hypertext link is clicked, the click event is executed and the link's associated __________ is opened.
Definition
URL or uniform resource locater
Term
The process of debugging a program by stepping through the statements line by line is called tracing the logic.
Definition
True
Term
The alert() method can be used throughout code that you think may have problems to print out the values of certain variables while the code is executing.
Definition
True
Term
Tracing is the examination of individual statements in an executing program.
Definition
True
Term
If a program is having errors and the problem cannot be located in the JavaScript code itself, the error may be in the HTML code.
Definition
True
Term
The process of tracing and resolving errors in a program is commonly known as _________________________.
Definition
debugging
Term
To test and execute JavaScript statements without an XHTML document or JavaScript source file, use the
Definition
Javascript URL
Term
An if statement can be used to execute one or more program statements if an evaluated condition returns a value of false.
Definition
False
Term
Multiple program statements contained within a set of braces is a command block.
Definition
True
Term
The conditional expression for an if statement can use comparison, logical, and assignment operators.
Definition
False
Term
An if...then statement can be defined to execute one set of code if an expression is true, and another set of code if the expression is false.
Definition
False
Term
JavaScript allows statements to be nested no more than 10 levels deep.
Definition
False
Term
Multiple statements can be included for a case label without using braces to create a command block.
Definition
True
Term
The process that determines the execution sequence for statements in a program is called __________ control.
Definition
flow
Term
A case label consists of the keyword case, a literal or variable name, and a(n) __________.
Definition
colon
Term
The conditional expression for an if statement must be enclosed within __________.
Definition
parenthesis
Term
A group of program statements defined within curly braces is a(n) __________ block.
Definition
command
Term
In addition to comparison operators, the conditional expression in an if statement can also include __________ operators.
Definition
logical
Term
The elements within a JavaScript array can be all different data types.
Definition
True
Term
The size of a JavaScript array can change dynamically while a program is executing.
Definition
True
Term
Each repetition of a loop statement is called a cycle.
Definition
False
Term
When a conditional expression is incorrectly defined, or never updated, it can cause a loop statement to repeat infinitely.
Definition
True
Term
The counter used to control a for statement's loop must be initialized elsewhere in the program before the for statement is defined.
Definition
False
Term
The counter variable used in a for statement is incremented/decremented at the end of every loop iteration, and then the conditional expression is evaluated again.
Definition
True
Term
You can stop a specific iteration of a looping statement but continue with the next iteration by using the break statement.
Definition
False
Term
The while statement is a(n) __________ statement that repeatedly executes one or more statements depending on the return value of an evaluated condition.
Definition
Loop or looping
Term
A variable that is incremented or decremented with every repetition of a loop is called a(n) __________.
Definition
Counter
Term
A loop statement that is similar to a while loop but will always execute the loop statements at least once is the __________ statement.
Definition
do...while or do while
Term
The first part of a for statement's constructor is used to __________ the expression.
Definition
initialize
Term
JavaScript does not require all three parts of the for statement's constructor to be specified, but if they are omitted a(n) _________ must be included for any missing part.
Definition
semicolon
Term
It is possible to skip an iteration of a loop, and continue with the next iteration by using the __________ statement.
Definition
continue
Term
The equal sign is an example of a unary operator.
Definition
False
Term
The expression, newval = ++count;, will return a value of count + 1 to the variable newval.
Definition
True
Term
The "+=" assignment operator can be used to combine strings as well as numbers.
Definition
True
Supporting users have an ad free experience!