JavaScript Flashcards

1
Q

Is there a correlation between “JavaScript” and “Java”?

A

No. The name “JavaScript” is not in any way related or have anything to do with “Java”. The language was named “JavaScript” around the time when Java was gaining popularity and being heavily marketed.

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

What is another interchangeable name for JavaScript?

A

ECMAScript

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

As of 2009, we’re now at the point where all major browsers support what version of ECMAScript?

A

5

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

The word “while” in a for loop is a _____ structure.

A

control

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

What is the most common font face / type family used to denote <code></code> syntax in print and web?

A

Monospace, courier

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

CRUD

A

Create, Read, Update, and Delete.

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

In JavaScript, what is a decimal / whole number also and more commonly referred to as?

A

Integer

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

A ___ ________ is represented by zeros and ones.

A

bit sequence

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

What is the binary equivalent number of 13?

A

00001101

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

What are the 6 basic value types in JavaScript?

A

Numbers, strings, booleans, objects, functions, and undefined values.

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

JavaScript uses a fixed number of how many bits to store a single number value?

A

64

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

64 bits is the equivalent of roughly how many different numbers?

A

18 quintillion

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

What does the letter “e” represent in the number 2.998e8?

A

Exponent

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

6.78 is a __________ number.

A

fractional, floating point.

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

__________ digit numbers are approximations and not precise values.

A

Fractional

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

The main thing to do with numbers in JavaScript and other programming languages is this.

A

Arithmetic

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

What is the singular term used to represent The + and * in JavaScript?

A

Operator

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

The __________ of each operator determines the order in which calculations are made.

A

precedence

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

The “modulo” otherwise known as the _________ operator.

A

remainder

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

You are ________ a character by preceding it with a backslash.

A

escaping

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

When the “n” character occurs after a backslash, it is interpreted as what?

A

A new line

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

How is the tab character in a string represented?

A

\t

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

Strings are not added but ____________ together.

A

concatenated

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

“mic” + “hel” + “ “ + “joan” + “isse”

A

A string concatenation

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

typeof is a _____ operator.

A

unary

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

This operator produces a string value naming the type of value you give it.

A

typeof

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

Operators that use two values are called ______ operators, while those that only take one are called _____ operators.

A

binary, unary

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

Which of the two (uppercase or lowercase) letters has higher precedence in a string value?

A

lowercase

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

The actual and precise string character ordering is based on the _______ standard.

A

unicode

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

What is the only number in JavaScript not equal to itself?

A

NaN

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

A fragment of code that produces a value is called an __________.

A

expression

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

A program is simply a list of __________.

A

statements

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

A variable name cannot include punctuation, except for these 2 characters.

A

$ _

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

If you ask for the value of an empty variable, you’ll get what value?

A

Undefined

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

var, break, for, else, switch, true, typeof, continue, null, this […]

A

Special meaning words are referred to as “keywords”.

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

Executing a function is called ________, _______, or ________ it.

A

invoking, calling, applying

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

This function takes any number of number values and gives back the greatest.

A

Math.max

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

When a function produces a value, it is said to ______ that value.

A

return

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

This function converts a value to a number.

A

Number

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

A for loop is this control flow type.

A

Conditional Execution

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

Curly braces do for statements what parentheses do for expressions: they _____ them together, making them count as a ______ _________.

A

group, single statement

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

A sequence of statements wrapped in braces is called a _____.

A

block

43
Q

The “do” loop differs from the “while” loop only on one point, what is that point?

A

A “do” loop always executes its body at least once and it starts testing whether it should stop only after the first execution.

44
Q

Values passed to functions are called _________.

A

arguments

45
Q

When this keyword is encountered in a loop body, control jumps out of the body and continues with the loop’s next iteration.

A

continue

46
Q

Why does the number function begin with a capitalized letter?

A

To convey / mark the function as a constructor.

47
Q

There are two kinds of flow control disturbances, what are they?

A

Conditional and looping statements.

48
Q

What does JSON stand for?

A

JavaScript Object Notation

49
Q

The environment encapsulates what in common JavaScript terminology?

A

The set of defined variables.

50
Q

A statement ends with this character.

A

;

51
Q

Part of the browser that reads, understands, and runs the instructions in a JavaScript program.

A

JavaScript Interpreter

52
Q

When a browser follows the instructions in a program, it ____ or ________ that program.

A

runs, executes

53
Q

3.8712 and .00009 are this kind of number.

A

Floating Point

54
Q

What are the 3 types of numbers in JavaScript?

A

Integers (whole), Fractional (floating point), Scientific Notation.

55
Q

The “plus” symbol is more technically referred to as this.

A

Addition Operator

56
Q

What does Math.random() produce?

A

A random number from 0 up to but not including 1 (e.g. 0.9127127448).

57
Q

===

A

Strict equality operator; compares the type, as well as the value.

58
Q

A condition always ________ to true or false.

A

evaluates

59
Q

True or false: Just 1 of multiple “or” conditions (expressions) needs to evaluate as true in order for the entire larger conditional to return true.

A

true

60
Q
// \_\_\_\_\_\_\_\_\_\_\_\_ functions and variables.
// self \_\_\_\_\_\_\_\_\_\_ at script run time.
(Function() {
})();
A

Encapsulates, invocation

61
Q

var myStore = {};

A

Object literal notation

62
Q

What will the following function return?

myFunc() {
Math.floor(Math.random() * 6) + 1;
}

A

A randomly generated whole number between 1 and 6.

63
Q

A function expression let’s you assign a function to a ________.

A

variable

64
Q

A function “expression” let’s you assign a function to a ________.

A

variable

65
Q

A function “expression” let’s you assign a function to a ________.

A

variable

66
Q
// true or false?
var alertMe = function() {
    alert("This function is anonymous, it has no name.");
}
A

True

67
Q
// true or false?
var alertMe = function() {
    alert("This function is anonymous, it has no name.");
};
A

True

68
Q

This character is required after the final brace when declaring an anonymous function.

A

;

69
Q

“return” exits a function and send a value back to the spot in the program where the function was called.

A

True

70
Q

Variables, arrays, objects, are ____ _________.

A

data structures

71
Q
The following statement is what type of array?
var myShopping = [ ];
A

Array Literal

72
Q
// Each singular value in this array is an "array \_\_\_\_\_\_".
var players = ['Jim', 'Shawna', 'Andrew', 'Lora', 'Aimee', 'Nick'];
A

indice

73
Q

Can you use the push( ) method to add more than one item to an array at a time? For example, is this valid:

scores.push( 77, 76, 89 );

A

True

74
Q

An ______ is a container for values in the form of __________ and functionality in the form of _______.

A

object, properties, methods

75
Q

Objects: The name of the property is a ___.

A

key

76
Q

The condition of all values at a particular point in time is referring to the object’s _____.

A

state

77
Q

What are the three kinds of objects?

A

native, host, custom

78
Q

Values stored in objects are called

A

properties

79
Q

Functionality encapsulated by an object is called a

A

method

80
Q

The technique used in JavaScript to share functionality between similar types of objects is known as what?

A

Prototypal Inheritance

81
Q

You _______ a variable name.

A

declare

82
Q

Name the 5 primitive data types in JavaScript.

A

Number, String, Boolean, Undefined, Null

83
Q

Simply put, in the context of data types, primitive means what?

A

They are not objects; they are primitives -

“simple data types”.

84
Q

Describe the difference between Undefined and Null.

A

“Undefined” means there’s a variable but it has no value; on the contrary, “Null” means no variable by that name / reference exists.

85
Q

JavaScript has something called “Dynamic Typing”, what does that mean?

A

It means you don’t have to manually define the data type of a variable, JavaScript does it on it’s own, and on the fly.

86
Q

What is type coercion?

A

It means JavaScript converts data types on the fly as needed, this happens when when data types are mixed.

87
Q

What is variable mutation?

A

“Variable Mutation” is the technically correct and fancy way of saying “changing the value of a variable”.

88
Q

Why are functions sometimes referred to as “first-class citizens” in JavaScript?

A

Because they can be store in variables or passed to functions like any other data types.

89
Q

True or False: A parent experiences the same event a child (element) does because of “event bubbling”.

A

True

90
Q

What is the callback function that is passed to addEventListener often referred to as?

A

An event handler

91
Q

Why is a web proxy useful for AJAX requests?

A

It allows you to bypass a web browser’s same-origin policy by retrieving data from another server, while keeping AJAX requests within the same domain.

92
Q

What do we call the style of programming where we describe the final result, and not the steps?

A

Declarative

93
Q

What is React?

A

A library for creating user interfaces.

94
Q

What do we call the style of programming where we write out step by step what to do?

A

Imperative

95
Q

What tool do we use to translate JSX files into standard JavaScript?

A

Babel

96
Q

True or False: A React component must return only a single virtual DOM element.

A

True

97
Q

True or False: You can use if / else statements inside JSX expressions.

A

False

98
Q

In React, breaking up a larger component in to smaller components that can be composed together is referred to as what?

A

Decompose / Decomposition

99
Q

In React, a method of combining many smaller or simpler pieces to create a larger piece is known as what?

A

Composition

100
Q

In React, which function allows you to create a list of JSX elements from an array of JavaScript values?

A

array.map

101
Q

In React, which property is required on components generated in a loop?

A

Key

102
Q

True or False: The React community has several state management libraries for use with React.

A

True

103
Q

When using React.class, you do not need to call .bind() on methods in order to keep the reference to “this” intact.

A

True

104
Q

In React, it’s good practice to concentrate our application state high in our virtual DOM tree.

A

True