Skip to content

Instantly share code, notes, and snippets.

View louisrli's full-sized avatar

Louis louisrli

View GitHub Profile
[user]
name = Louis Li
email = louisrli@gmail.com
[alias]
b = branch
ci = commit
cb = checkout -b
co = checkout
p = push
l = log
# back up local
mongodump -o localdump --port 3001 --db meteor
# restore from remote
mongorestore --port 3001 dump/bboypractices --db meteor

Discussion Questions: Execution Context

Objectives

  • Explain JavaScript execution context in terms of English language patterns
  • Predict behavior of JavaScript's this keyword

Exercise: Context in Language

In conversation, we use pronouns to 'stand in' for the nouns they refer to. In order to understand sentences that take advantage of this 'language feature', speakers need to be able to infer the meaning from the context.

Discussion Questions: Execution Context

Objectives

  • Explain JavaScript execution context in terms of English language patterns
  • Predict behavior of JavaScript's this keyword

Exercise: Context in Language

In conversation, we use pronouns to 'stand in' for the nouns they refer to. In order to understand sentences that take advantage of this 'language feature', speakers need to be able to infer the meaning from the context.

## Reviewing JavaScript Object Orientation
?:
```javascript
class Tree {
constructor(type) {
this.type = type;
}
}
## Reviewing JavaScript Object Orientation
?:
```javascript
class Tree {
constructor(type) {
this.type = type;
}
}

Reviewing JavaScript Object Orientation

?:

class Tree {
  constructor(type) {
    this.type = type;
  }
}

Quiz: Reviewing JavaScript Object Orientation

???

Reviewing JavaScript Object Orientation

?:

class Tree {

Predicting Constructor Effects

Questions

class Rectangle {
  constructor(sideA, sideB) {
    this.sideA = sideA;
    this.sideB = sideB;
    this.area = sideA * sideB;
@louisrli
louisrli / components.md
Last active May 16, 2020 11:22
Component Activity

Goal

The goal of this activity is to create a reusable component in React.

Requirements

Write a React class or function component (your choice) that represents a project that you completed.

It should take the following props:

  • Project name
  • Project description