• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/30

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

30 Cards in this Set

  • Front
  • Back

The JavaScript code for the following algorithm is ____.


If age >= 65 Then


discountRate = 0.10


End If

if (age >= 65) Then {


discountRate = 0.10;


}

A ____ evaluates to a true or false value.

Boolean expression

The following symbols are known as ____.


<, >, ==, <=, >=, !=

comparison operators

When two conditions are joined by the logical ____ operator, both must be true for the combined condition to be true.

And

A ____ occurs when two or more conditions have to be evaluated for an action to take place.

complex condition

Which of the following represents a negated condition?
if (!(daysOverdue > 10 || fineOwed > 0.00)) { document.write("Your account is in good standing." + BR);}
The keywords And, Or, and Not, are known as ____.

logical operators

The following if statement will execute the code block

var x = 1;


var y = 2;


if ((x == y) || (x > y)) {


document.write("Isn't JavaScript Great!");


}

False

The comparison operator === returns true if

The values on both sides are equal and of the same type

The following are ALL logical operators &&, ||, and !

True

A parameter acts like a in the body of a function?

local variable
A function can return this many values?

One

When a function is finished executing the program ends?
False
You can name a function anything you want using any characters you want?
False
The first thing in a function declaration is?

The function keyword

The order of the arguments in a function call must match the order of the function's parameter list?

True

Which message is displayed in the alert for the following script?

var message="I am the original message";


function setMessage() {


var message = "I am another message";


}


setMessage();


alert(message);

I am the original message

When a variable is passed by value as a function argument, it means a copy of the variable is passed to the function. Any changes made to the variable's value in the function will not affect the original variable's value?

True

In a function call the values in parentheses are called?

Arguments

In the following function declaration the declared message variable is global?

function displayMessage() {


message = "This is a message";


}

True

What is the numbered position of an array called?

index or subscript

someArray has six elements. How would you access the fifth element?

someArray[4]

The syntax to create an empty array is?

var someArray = [];

Arrays should be used to store?
A list of one or more values of the same data type
A for loop is best suited for iterating through all the elements of an array because?
The array length is always known & You know the exact number of iterations that are needed

(Both B and C)


The syntax to create a populated, or initialized, array is?

var someArray = [1, 2, 3, 4];

What kind of loop is the for loop?

A counter controlled loop

The JavaScript array push function is used to?

Add a value to the end of the array

In the array someArray, what does someArray.length display?
The number of elements in the array (regardless of whether or not they are populated)
What JavaScript array function would you use to remove an element from the beginning of an array?

The shift function