Skip to content

Add This & Prototype Challenges - #1

Open
Catherinesjkim wants to merge 6 commits into
masterfrom
catherine-kim
Open

Catherinesjkim wants to merge 6 commits into
masterfrom
catherine-kim

Conversation

@Catherinesjkim

Copy link
Copy Markdown
Owner

Because:

  • Finished 'This' assignment.
  • This challenge focuses on building prototypes for a fantasy themed game.

This commit:

  • Finished the challenges except the last console.log on prototypes.js
  • The last console.log says swordsman.destroy is not a function
  • Need to work on Stretch Challenges.

Catherine Kim and others added 2 commits October 8, 2019 06:35
Because:
-Having a solid understanding how 'this' works will give me a huge advantage when I start building with more advanced frameworks.

This commit:
- Used the this.js file to traverse through a few 'this' problems.
Because:
- This challenge focuses on building prototypes for a fantasy themed game

This commit:
- Finished the challenges except the last console.log
- The last console.log says swordsman.destroy is not a function
- Need to work on Stretch Challenges.
@Catherinesjkim
Catherinesjkim requested a review from dhamano October 9, 2019 03:23
Catherine Kim and others added 4 commits October 8, 2019 21:14
Because:
- The last console.log was giving me an error message
- swordsman.destroy not a function

This commit:
- It was a typo: Misspelled 'prototype'! CharacterStats.prototype = Object.create(GameObject.prototype);
- Will be more carefule next time
Because:
- It's fun!

This commit:
- Created a Villain and Hero constructor functions that inherit from the Humanoid constructor function.
- Gave the Hero and Villains different methods that could be used to remove health points from objects which could result in destruction if health gets to 0 or drops below 0;
- Create two new objects, one a villain and one ahero and fight it out with methods
…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.
Because:
- It's fun!

This commit:
- Created Villain and Hero constructor functions that inherit from the Humanoid constructor function.
- Gave the Hero and Villains different methods that could be used to remove health points from objects which could result in destruction if health gets to 0 or drops below 0
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.

1 participant