Introduction to Javascript Flashcards

1
Q

Console

A

A panel that displays important messages, like errors, for developers.

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

Code Comments

A

As we write JavaScript, we can write comments (instructions or useful annotations) in our code that the computer will ignore as our program runs. These comments exist just for human readers.

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

What are the two types of code comments?

A
  1. Single Line comment (/)
  2. Multi line comment - in front (/) at end (/)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Data types

A

classifications we give to the different kinds of data that we use in programming.

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

What are the seven fundamental data types:

A
  • Number
  • String
    -Boolean
    -Null
    -Undefined
    -Symbol
    -Object
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What data types are considered primitive data types

A
  • Number
  • String
    -Boolean
    -Null
    -Undefined
    -Symbol
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain a “Number” Data Type

A

Any number, including numbers with decimals: 4, 8, 1516, 23.42.

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

Explain a “String” Data Type

A

Any grouping of characters on your keyboard (letters, numbers, spaces, symbols, etc.) surrounded by single quotes: ‘ … ‘ or double quotes “ … “, though we prefer single quotes. Some people like to think of string as a fancy word for text.

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

Explain a “Boolean” Data Type

A

This data type only has two possible values— either true or false (without quotes). It’s helpful to think of booleans as on and off switches or as the answers to a “yes” or “no” question.

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

Explain a “Null” Data Type

A

This data type represents the intentional absence of a value, and is represented by the keyword null (without quotes).

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

Explain a “Undefined” Data Type

A

This data type is denoted by the keyword undefined (without quotes). It also 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
12
Q

Explain a “Symbol” Data Type

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
13
Q

Explain a “Object” Data Type

A

Collections of related data.

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

What is an “Operator”

A

a character that performs a task in our code.

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

JavaScript has several built-in arithmetic operators, that allow us to perform mathematical calculations on numbers. List the arithmetic operators and their corresponding symbols

A

Add: +
Subtract: -
Multiply: *
Divide: /
Remainder: %

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

What is the “remainder” operator sometimes called

A

modulo

17
Q

Concatenation

A

appends one string to another

18
Q

Methods

A

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

19
Q

What are the Javascript “string methods”? This are methods that we ‘call’ or ‘use’, by appending an instance with:

A

-a period (the dot operator)
-the name of the method
-opening and closing parentheses

E.g. ‘example string’.methodName().