Introduction to Javascript Flashcards
Console
A panel that displays important messages, like errors, for developers.
Code Comments
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.
What are the two types of code comments?
- Single Line comment (/)
- Multi line comment - in front (/) at end (/)
Data types
classifications we give to the different kinds of data that we use in programming.
What are the seven fundamental data types:
- Number
- String
-Boolean
-Null
-Undefined
-Symbol
-Object
What data types are considered primitive data types
- Number
- String
-Boolean
-Null
-Undefined
-Symbol
Explain a “Number” Data Type
Any number, including numbers with decimals: 4, 8, 1516, 23.42.
Explain a “String” Data Type
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.
Explain a “Boolean” Data Type
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.
Explain a “Null” Data Type
This data type represents the intentional absence of a value, and is represented by the keyword null (without quotes).
Explain a “Undefined” Data Type
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.
Explain a “Symbol” Data Type
A newer feature to the language, symbols are unique identifiers, useful in more complex coding.
Explain a “Object” Data Type
Collections of related data.
What is an “Operator”
a character that performs a task in our code.
JavaScript has several built-in arithmetic operators, that allow us to perform mathematical calculations on numbers. List the arithmetic operators and their corresponding symbols
Add: +
Subtract: -
Multiply: *
Divide: /
Remainder: %