Chapter 1, 2, 3 Flashcards

(37 cards)

1
Q

JavaScript represents arrays with the ______ object

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Special function type used as the basis for creating reference variables

A

Constructor

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Syntax of an Array

A

var arrayName = new Array(number of elements);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Each piece of data contained in an array

A

Element

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Returns the number of elements in an array

A

length property

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Syntax of length property of the Array class

A

array_name.length;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Set of data represented by a single variable name

A

Array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Extract elements and values from an array you use the _______ method

A

slice()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Syntax for the slice() method

A

array_name.slice(start, end);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

______method removes and returns the first element from the beginning of an array

A

shift()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

______ method removes the last element from the end of an array

A

pop()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

______ method adds one or more elements to the end of an array

A

push()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Use the _____ method to add an d remove elements within an array

A

splice()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

use the _____ method to renumber the indexes in the array

A

splice()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Use the _____ method to sort an array alphabetically

A

sort()

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Use the _______ method to reverse the order of the elements of the array

17
Q

Use the _____ method to combine arraays

18
Q

Example of Client Side Scripting

19
Q

Example of Sever Side Scripting

A

PHP, ASP, Cold Fusion

20
Q

Browser and server exchange info using ____

21
Q

HTTP request has 3 things:
1.
2.
3.

A
  1. Name of html file being requested
  2. Internet address of browser
  3. Internet address of web server
22
Q

HTTP response has 3 things:
1.
2.
3.

A
  1. Address of browser making the request
  2. Address of server filling the request
  3. HTML document requested
23
Q

A _____ ______ is also called a Client/Server App

A

Web application

24
Q

Basic Syntax of While Loop

A

while (variable <= endvalue)
{
Code to be executed
]

25
A While Loop is considered a _____ tested loop.
Top
26
_______ method adds one or more elements to the beginning of an array
unshift()
27
A Do While Loop is considered a _____ tested loop
Bottom
28
Basic Syntax of a Do While Loop
``` do { Code to be executed } while (variable <= endvalue) ```
29
In a _____ loop you can declare and initialize a variable, set the condition, and increment
For
29
____ adds one to the value of i, then returns i;
++i
30
____ returns i then adds one to it
i++
31
Use _____________ to output to the screen
document.write();
32
Is a For Loop or a For-In Loop more efficient?
For-In
33
Is a For Loop or a For-In Loop more efficient?
For-In
35
How do you use a the constructor to create an array?
var arrayName = new Array();
36
_______ variables are deleted when you close the page
global
37
_______ variables are deleted when the function is completed
local