Skip to content

Instantly share code, notes, and snippets.

View haejinjo's full-sized avatar

Haejin haejinjo

  • New York, NY
View GitHub Profile
@connorrose
connorrose / github-workflow.md
Last active August 11, 2020 22:20
Github Workflow for Production Team

Initializing the project

  1. Create a personal fork of organization repository.
  2. Clone fork to your local machine.
  3. In the local clone of your personal fork: git remote add upstream https://github.com/oslabs-beta/Catalyst.git

When starting a new feature (locally)

  1. git checkout master -> Make sure you're starting at your local master branch
  2. git pull upstream master -> Pull in any merged changes from organization master
  3. git push origin master -> Update your remote fork with the new master
  4. git checkout -b -> Create a new feature branch and switch into it
@connorrose
connorrose / This-Binding-Examples.js
Last active September 10, 2020 07:00
This Binding of Arrow Functions vs normal Function Expressions in various contexts
// GLOBAL SCOPE
const foo = () => this;
const bar = function() {return this};
const baz = globalThis;
const thud = this;
console.log('globalThis : this in global scope => ', baz === thud); // false
console.log('Arrow this : this in global => ', foo() === thud); // true
console.log('Function this : globalThis => ', bar() === baz); // true