lesson 2 codecademy Flashcards

1
Q

variable

A

A variable can be thought of as a label that points to the location of a specific piece of data. Variables are not the values that is stored inside of them

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

Data Types

A

the classifications we give to the different kinds of data that we use in programming. In JavaScript, there are seven fundamental data types:
Number, String, Boolean, Null, Undefined, Symbol, and Object

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

Number

A

any number, including numbers with decimals

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

String

A

any grouping of characters on your keyboard surrounded by single quotes or double quotes, though we prefer single quotes.

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

Boolean

A

This data type only has two possible values: true or false. It’s helpful to think of booleans as on and off switches.

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

Null

A

represents the intentional absence of a value, and is represented by the keyword null.

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

Undefined

A

represents the absence of a value though it has a different use than null. undefined means that a given value does not exist

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

Symbol

A

a newer feature to the language, symbols are unique identifiers, useful in more complex coding,

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

Object

A

Collections of related data.

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

Arithmetic Operators

A

An operator is a character that performs a task in our code. They allow us to perform mathematical calculations on numbers.

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

String Concatenation

A

The process of appending one string to another.
ex: console.log(‘hi’+’ya’); //Prints ‘hiya’

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

Properties

A

All data types have access to specific properties that are passed down to each instance. You can retrieve property information by appending the string with a period and the property name
ex: Every string instance has a property called length that stores the number of characters in that string. console.log(‘Hello’.length); //Prints 5

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

Methods

A

actions we can perform. Data types have access to specific methods that allow us to handle instances of that data type.

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

The rules for naming variables

A

Variable names cannot start with numbers.
Variable names are case sensitive, so myName and myname would be different variables.
Variable names cannot be the same as keywords.

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

An if statement

A

checks a condition and will execute a task if that condition evaluates to true.

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

if.. else statements

A

make binary decisions and execute different code blocks based on a provided condition.

17
Q

else if statements

A

gives us the ability to add more conditions