4. Adding Interactivity with JavaScript Flashcards

(65 cards)

1
Q

Powerful programming language that provides significant value in web development

add interactivity to websites

A

JavaScript

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

Server-side JavaScript development

A

Node.js

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

Scripts run directly within your users’ browsers

A

Client-side interactivity

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

Responsive and interactive user

A

interfaces

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

Broad API and third-party service integration that permit

A

multi-tier applications

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

Development through frameworks like React Native and Iconic

A

Cross-platform mobile app development

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

Vast ecosystem of libraries, frameworks and tools

A

Near-universal browser support

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

JavaScript can be included in your web pages by referencing an external .js file as an attribute of the

A
<script>
tag
</script>
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

You can drop your JavaScript code between the

 tags in the
A

Header section of your HTML

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

Since the adoption of “___________” you no longer need to add the text/javascript as an attribute of the

 tag.
A

HTML5

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

JavaScript is the default scripting language for

A

HTML

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

Comments accomplished by

A

//

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

Character concatenates all values in sentence

A

+

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

To get to command line

A

F12

right click browser and select INSPECT

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

Representation of the page code

A

Elements tab

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

Live JavaScript environment

A

Console

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

Built-in JavaScript function that allows you to output messages or values to the console.

A

console.log()

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

Primary tool for storing and processing data and is a location in memory that’s identified in your code by a name - more descriptive the better

A

variable

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

Similar to a variable in that it’s also a named storage location but it represents a value that can’t be reassigned or changed once it is assigned.

ie - lastname

A

constant

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

data meant to be read literally and not treated as say numbers

A

string

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

value of either true or false

A

boolean

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

Another way of saying that some variables can be valid more widely than others.

A

Block Scope

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

Variable values can be accessed from any place and at any level of a program

A

global

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

Variable values are available only within a limited block of code

A

local

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
A method for hanging the execution of specific code on the status of a condition.
If block
26
Ordered collection of multiple values listed within square brackets best for ordered lists of elements
arrays
27
unordered collection of key-value pairs where each key is a string or symbol and each value can be of any type appropriate for representing structured dta with named properties and behaviors.
objects
28
Special value in JavaScript that represents the absence of value assigned to values that have been declared but have not been assigned a value or to function params that have not been provided with arguments.
undefined
29
Special value in JavaScript that represents the intentional absence of any object value assigned explicitly to indicate the absence of an object or the intentional clearing of an object reference.
null
30
Represents a value that is not a valid number and is returned when a mathematical operation or function expects a numerical result but fails to produce one.
NaN "Not-a-Number"
31
The process of converting a value from one datataype to another.
Type Conversion Type Coercion
32
JavaScript variables can hold values of different data types and JavaScript automatically performs this when necessary
Dynamically Typed
33
Occurs implicitly (not directly expressed) automatically converts from one type to another based on
context
34
Operator used to increase the value of a variable by 1 and can be placed before or after the variable to influence behavior
++
35
When ++ is placed before the variable is incremented and its ++x
NEW value is returned
36
When placed after the variable (X++) the variable is incremented but its
ORIGINAL value is returned.
37
Operator used to decrease the value of a variable by 1
decrement (--)
38
when placed after like in x-- the variable is decremented but its
ORIGINAL value is returned
39
A short way of writing x = x + y
+=
40
subtraction assignment operator
-=
41
multiplication
*=
42
Fantastic way to get time consuming, boring, and repetitive work done fast.
JavaScript Control Structures
43
In a switch this statement is used after each case to exit the switch statement once a match is found
break
44
loop skips the rest of the body for the next iteration and proceeds to the next
while loop
45
operator that performs type coercion that tries to convert the operands to a common type before making the comparison.
==
46
Operator that performs strict equality comparison without any type of coercion and if the types are different, the comparisons immediately return as false.
===
47
inequality
!=
48
strict inequality
!==
49
Checks coercion if it is not equal if of different values they are coerced
!=
50
boolean value false number zero empty string the absence of any value (or, null) undefined variables NaN
javascript falsy
51
any other types of values that are not javascript falsy
truty
52
represents the structure and content of an HTML document as a tree-like structure where each element, attribute and text node in the HTML document is represented as a node in the DOM tree and provides a way to interact with and manipulate the elements of HTML document using JavaScript
DOM Document Object Model
53
The ability to access, modify and add elements dynamically, change styles and classess, handle events and perform other operations on
documents
54
Top-level object representing the HTML document. that serves as the entry point for accessing the DOM tree and provides methods for navigating and manipulating the document.
Document
55
Represents an HTML element in the DOM tree and has properties that allow you to access and modify attributes, styles and content
Element
56
common select methods
getElementById getElementByTagName getElementsByClassName
57
base class for all types of nodes in the DOM tree and can be elements, text nodes, comment nodes - etc. They have properties and methods for common operations, such as accessing parent and child nodes, manipulating node content and more.
Node
58
Attached to modes to respond to events like clicks, keypresses, mouse movements
Event Listeners
59
You can interact with the HTML DOM to dynamically modify the content and behavior of an HTML page.
Using JavaScript
60
method to select elements by their id attribute and it modifies the element's contents and properties using dom manipulation
getElementById
61
Dom manipulation that sets the HTML content inside the selected element. In this case, we change the heading's text to New Heading
innerHTML
62
Dom manipulates accessing the CSS styles of the selected element that set the paragraph's text color to red.
Style
63
Dom manipulation that sets the text conent of the selected element that we update the paragrah's text to "This is an updated paragraph"
textContent
64
displays an alert box with the message button clicked
showMessage
65
Changes the background color of the
element with the id of myDiv to red when button is clicked
changeColor