Send a link to your students to track their progress
32 Terms
1
New cards
*What is the difference between HTML, CSS and JavaScript?*
HTML=structure/framework
CSS=design
JavaScript=interactive features
2
New cards
*How does the computer interpret the world through code?*
Uses a model of an object; object-oriented programing
3
New cards
*Describe objects:*
\*objects are things:
\-they have properties, events, and methods
\-properties+events+methods=object
4
New cards
*Describe events:*
\*involve user interactions
\-programmers choose what events trigger a specific section of code
\-scripts can trigger different types of functionality
5
New cards
*Describe methods:*
\*how people interact with objects
\-second part of the code after period (member operator)
6
New cards
Identify the event and method
document.write(‘Good afternoon!’)
\ event method
|------------| |-----------------------------|
document.write(‘Good afternoon!’)
7
New cards
*Describe how computers interpret the code:*
Events trigger methods and methods retrieve or update an objects properties
8
New cards
Describe variables
store temporary bits of information to perform a task
9
New cards
Identify the variable and name
var boldColor | let boldColor
variable name
|----| |---------|
var boldColor
10
New cards
what are the variable keywords?
var
let
const
11
New cards
how do you declare a variable?
give it a name (identifier)
12
New cards
describe value
data that is stored within the variable
a value must be assigned to a variable
13
New cards
What are the different data types?
Numeric, strings, boolean
14
New cards
Describe the numeric data types
can be decimals or negative numbers
cannot have commas
15
New cards
describe strings
consist of letters and characters
add content to a page
always within ‘single’ or “double” quotation marks
16
New cards
describe booleans
can only have 1 of 2 values, true or false
17
New cards
describe arrays
a special type of variable that stores a list of values
18
New cards
what are the characteristics of an array
always in \[square brackets\] or array()
used for a list or set of values, useful if the number of items will vary
always separated by commas, uses ‘single’ or “double” quotes
index starts with 0
ex:
let stopLight;
stopLight = \[‘yield’, ‘stop’, ‘walk’\];
stopLight\[1\] = ‘go’
19
New cards
describe what is happening in this script
ex:
let stopLight;
stopLight = \[‘yield’, ‘stop’, ‘walk’\];
stopLight\[1\] = ‘go’
stopLight has an index of 1 which would be stop, but it is set equal to go, so stop is being changed to go making the stopLight array \[‘yield’, ’go’, ‘walk’\]
20
New cards
describe expressions
result in a single value
21
New cards
describe operators
used to create a single value from one or more values
22
New cards
what are the 4 different operators?
assignment (=)
string (+)
logical (&&)
comparison (> |
23
New cards
what is the assignment operator
=
assigns a value to a variable
24
New cards
what is the string operator
\+
combines two strings
25
New cards
what is the logical operator
&&
combines expressions as true or false (boolean)
26
New cards
what is the comparison operator
> <
compares values
27
New cards
explain this script
28
New cards
describe functions
a series of statements that are grouped to perform a task
29
New cards
describe conditions
conditions determine a path to take
returns a true or false value (boolean)
30
New cards
describe conditional statements
if a condition is met, then a statement is executed
else code executes a different statement (AKA code skips ahead)
if statements compares value to true
else if the value is false
31
New cards
describe the DOM
document object model
views and changes the output of HTML without actually changing the original HTML