Skip to content

Instantly share code, notes, and snippets.

@npdarrington
Created July 1, 2020 05:34
Show Gist options
  • Save npdarrington/56063ae613cb251c06d9345e3cd7736f to your computer and use it in GitHub Desktop.
Save npdarrington/56063ae613cb251c06d9345e3cd7736f to your computer and use it in GitHub Desktop.
## Day 2
1. What are the 5 primitive data types we learned about today?
- B.U.N.N.S -> Boolean, Undefined, Number, Null, String
2. How are variables useful and what is an example of one that has a value assigned to it?
- A variable assigns a certain amount of computer memory to store information that can be used now or computer to be used at a later time.
```javascript
var name = Nathan;
```
3. Write out an example of string concatentation. Now write that same example using a string literal.
```javascript
var weather = "beautiful";
var city = "Colorado Springs"
var concat = "It is a " + weather + " day here in " + city + "!";
var literal = `It is a ${weather} day here in ${city}!`
```
4. Write out the basic structure of an if/else conditional.
```javascript
if (conditional) {
// perform action
} else {
// perform action
}
```
5. Write down at least one question you have coming out of this lesson.
- What are some of the reserved keywords that cannot be used as a variable name and which ones _can_ be used, however it is best practices not to use them?
- EX: for and var are reserved key words that cannot be used to declare a variable name, however, undefined is __not__ a reserved keyword in a local scope, however is considered to not be best practice declaring a variable with that name inside of a local scope.
### Day 2 Stop and Reflect
1. How do you create an object using literal notation?
- var person = {key: 'value'};
1. What is an object and what is it made up of?
- An object is a bundle of behaviors and state properties that are group underneath a like-minded subject
1. When we assign a function as the value of a key inside an object, what do we call it?
- A method or a behavior
### Statements and Expressions
1. What patterns are you noticing between statements and expressions?
- There are more statements than expressions, as you return more answers (statements) than you do creating new ways to process data (expression)
1. Has your understanding of the differences between statements and expressions changed at all?
- I will definitely need more repetition in order to have a full handle on it, however this was a good beginning.
1. What questions remain?
- None, just more practice.
1. Where might you ask a question?
- Does an expression explicitly provide a solution to an answer, while a statement is the answer or declares what an answer should be?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment