Primative Data Types Flashcards

1
Q

Name the 6 Data Types

A
  • Numbers
  • Strings
  • Boolean
  • null
  • undefined
  • object
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Variable

A

Placeholder for values to be used by the program.

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

=

A

Assignment operator

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

document.write()

A

• write something to the HTML document

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

string

A
  • Words or characters that are contained in quotation marks “ “
  • used for text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Comments

A
// comment a single line
/* comment multiple lines */
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Two main number types

A
  • Integer - whole numbers without decimal point
  • float - decimals
  • Many languages categorize both as two separate types.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Expression

A

Any reference to a variable or value, or a set of variables and values combined with operators

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

Statement

A

In a computer language, a group of words, numbers, and operators that perform a specific task

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

Operators

A

Perform actions on values and variables.

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

Static typing

A
  • A variable that can only hold a specific data type. e.g. number or string not either.
  • Also known as strict enforcement.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Dynamic typing

A

A variable that can hold any type of value at a time.

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

Constant

A
  • variable who’s values doesn’t change
  • they are declared with all caps and underscores instead of camilCase for normal variables.
  • declared at the top of a program.
  • ES6 allows declaration with “const” instead of var
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Block

A
  • a sequence of statements wrapped in braces { }
  • typically seen with conditionals and loops but doesn’t have to be.
  • doesn’t need a semicolon
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Undefined

A
  • Variable that has no value or not in existence
  • JavaScript will return undefined if it does not have a value for something.
  • you will see undefined if you create a variable and don’t set a value
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Null

A
  • Intentional absence of an object

* deliberately setting an variable to no value/nothing.

17
Q

Boolean

A

True or false

• used for yes or no questions

18
Q

typeof()

A

• shows variable type