Skip to content

Instantly share code, notes, and snippets.

View louisrli's full-sized avatar

Louis louisrli

View GitHub Profile

Reviewing JavaScript Object Orientation

?:

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

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.

# back up local
mongodump -o localdump --port 3001 --db meteor
# restore from remote
mongorestore --port 3001 dump/bboypractices --db meteor
[user]
name = Louis Li
email = louisrli@gmail.com
[alias]
b = branch
ci = commit
cb = checkout -b
co = checkout
p = push
l = log
LaTeX-Box
MatchTagAlways
a.vim
ack.vim
coffeetags
command-t
gist-vim
goyo.vim
handlebars
mustache.vim
filetype on
filetype indent on
filetype plugin on
syntax on
set wildmenu
set splitright
" Airline
set laststatus=2
#!/usr/bin/env python
import algo
import random
import time
tetris = algo.TetrisLearningProblem()
while not tetris.is_terminal():
actions = tetris.get_possible_actions()