Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
18 Cards in this Set
- Front
- Back
What are the six data types that you currently know of? |
Numbers, strings, boolean, arrays, functions, and objects |
|
How do you denote a string in JavaScript? |
With single or double quotations |
|
What are the two states for a Boolean data type? |
True and false |
|
What is the significance of the console.log object? |
It enables communication with standard output devices, and allows you to highlight your output in different ways. |
|
What is the name of '%', and what is it used for? |
Obelus or modulus, it is used for generating the remainder of a division |
|
What are lines of code in JavaScript commonly ended with? |
A semicolon |
|
How are variables best described in JavaScript? |
Variables allow the user to store or hold data. |
|
What is the correct way to generate a random number in JavaScript? |
Math.random() |
|
What is string interpolation? |
When you insert a variable into a string |
|
What is the correct way to declare a variable? |
var myName = 'Jon'; |
|
How do you determine if two values are equal and not equal in JavaScript? |
With the comparison operators, === and !==. |
|
Define control flow. |
The act of making decisions with code. |
|
What are all the comparison operators? And how are they interpreted by the system? |
>, <, >=, <=, ===, !==. They are interpreted as true or false statements. |
|
What is escaping a character and how do you code it in JavaScript? |
Escaping a character prevents code from being interpreted as declaring a string and it is coded by typing a forward slash in front of the quote. |
|
What are all of the logical operators? And what do they tell the console? |
&&; and; both conditions must be met ||; or; either condition must be met !; not; this condition must not be met |
|
What is a function? What is its primary purpose? |
Functions perform a set of tasks on variables and return the result. They are primarily used for making reusable sets of code. |
|
With what is a block of code declared? |
Curly braces |
|
What is a parameter? |
A variable "passed in" when calling the function. |