Skip to content

Jose Garza - #2

Closed
jggarza5 wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
jggarza5:master
Closed

Jose Garza#2
jggarza5 wants to merge 3 commits into
bloominstituteoftechnology:masterfrom
jggarza5:master

Conversation

@jggarza5

@jggarza5 jggarza5 commented Apr 18, 2018

Copy link
Copy Markdown

JavaScript III

this

  • Explain the four principles for the this keyword
  • Code example for Principle 1
  • Code example for Principle 2
  • Code example for Principle 3
  • Code example for Principle 4

Prototypes

  • Create GameObject class
  • Create CharacterStats class
  • Create Humanoid class
  • Stretch Goal: Create Hero and Villain classes
  • Stretch Goal: Give the Hero and Villains methods to remove HP from objects
  • Stretch Goal: Create two new objects (hero and villain) and make them fight!

Good Habits

  • Pull Request title is your first and last name (add any notes in the comment field)
  • Code has been committed regularly
  • Commit comments are informative
  • Code is organized in a logical way

@mixelpixel mixelpixel closed this May 21, 2018
cornielleandres added a commit to cornielleandres/JavaScript-III that referenced this pull request Aug 8, 2018
umekow added a commit to umekow/JavaScript-III that referenced this pull request Aug 22, 2019
Catherinesjkim pushed a commit to Catherinesjkim/JavaScript-III that referenced this pull request Oct 12, 2019
…iple of This Keyword

Because:
- Deleted call(), apply(), bind(), or speak() are explicit binding, not implicit binding

This commit:
- Updates the bloominstituteoftechnology#2 principle of This.
- Automatic with objects in the methods. When a function is called by a preceding dot, the object before the dot is this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants