Repository navigation
Add This & Prototype Challenges - #1
Open
Catherinesjkim wants to merge 6 commits into
Open
Catherinesjkim wants to merge 6 commits into
Catherinesjkim wants to merge 6 commits into
Conversation
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because:
This commit: