4. Adding Interactivity with JavaScript Flashcards

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
Q

A method for hanging the execution of specific code on the status of a condition.

A

If block

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

Ordered collection of multiple values listed within square brackets

best for ordered lists of elements

A

arrays

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

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.

A

objects

28
Q

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.

A

undefined

29
Q

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.

A

null

30
Q

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.

A

NaN

“Not-a-Number”

31
Q

The process of converting a value from one datataype to another.

A

Type Conversion

Type Coercion

32
Q

JavaScript variables can hold values of different data types and JavaScript automatically performs this when necessary

A

Dynamically Typed

33
Q

Occurs implicitly (not directly expressed) automatically converts from one type to another based on

A

context

34
Q

Operator used to increase the value of a variable by 1 and can be placed before or after the variable to influence behavior

A

++

35
Q

When ++ is placed before the variable is incremented and its

++x

A

NEW value is returned

36
Q

When placed after the variable (X++) the variable is incremented but its

A

ORIGINAL value is returned.

37
Q

Operator used to decrease the value of a variable by 1

A

decrement (–)

38
Q

when placed after like in x– the variable is decremented but its

A

ORIGINAL value is returned

39
Q

A short way of writing x = x + y

A

+=

40
Q

subtraction assignment operator

A

-=

41
Q

multiplication

A

*=

42
Q

Fantastic way to get time consuming, boring, and repetitive work done fast.

A

JavaScript Control Structures

43
Q

In a switch this statement is used after each case to exit the switch statement once a match is found

A

break

44
Q

loop skips the rest of the body for the next iteration and proceeds to the next

A

while loop

45
Q

operator that performs type coercion that tries to convert the operands to a common type before making the comparison.

A

==

46
Q

Operator that performs strict equality comparison without any type of coercion and if the types are different, the comparisons immediately return as false.

A

===

47
Q

inequality

A

!=

48
Q

strict inequality

A

!==

49
Q

Checks coercion if it is not equal

if of different values they are coerced

A

!=

50
Q

boolean value false
number zero
empty string
the absence of any value (or, null)
undefined variables
NaN

A

javascript falsy

51
Q

any other types of values that are not javascript falsy

A

truty

52
Q

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

A

DOM

Document Object Model

53
Q

The ability to access, modify and add elements dynamically, change styles and classess, handle events and perform other operations on

A

documents

54
Q

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.

A

Document

55
Q

Represents an HTML element in the DOM tree and has properties that allow you to access and modify attributes, styles and content

A

Element

56
Q

common select methods

A

getElementById
getElementByTagName
getElementsByClassName

57
Q

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.

A

Node

58
Q

Attached to modes to respond to events like clicks, keypresses, mouse movements

A

Event Listeners

59
Q

You can interact with the HTML DOM to dynamically modify the content and behavior of an HTML page.

A

Using JavaScript

60
Q

method to select elements by their id attribute and it modifies the element’s contents and properties using dom manipulation

A

getElementById

61
Q

Dom manipulation that sets the HTML content inside the selected element. In this case, we change the heading’s text to New Heading

A

innerHTML

62
Q

Dom manipulates accessing the CSS styles of the selected element that set the paragraph’s text color to red.

A

Style

63
Q

Dom manipulation that sets the text conent of the selected element that we update the paragrah’s text to “This is an updated paragraph”

A

textContent

64
Q

displays an alert box with the message button clicked

A

showMessage

65
Q

Changes the background color of the <div> element with the id of myDiv to red when button is clicked

A

changeColor