Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: bloominstituteoftechnology/JavaScript-III
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: nobioma1/JavaScript-III
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 5 commits
  • 3 files changed
  • 2 contributors

Commits on May 8, 2019

  1. Configuration menu
    Copy the full SHA
    19cdc36 View commit details
    Browse the repository at this point in the history
  2. Solution on this.js

    - explain in my own words the four principles of this - Global, new, explicit, implicit
    - example of window binding, log the global this
    - example if implicit binding, create object with 3 properties and a method. Invoke the method
    - example of new binding, create constructor having a prototype method, instanciate with the new keyword, then use the method
    - example of explicit binding, declare a method without a context, use call, apply and bind to return context to the method
    nobioma1 committed May 8, 2019
    Configuration menu
    Copy the full SHA
    f637671 View commit details
    Browse the repository at this point in the history
  3. Solution on Prototypes

    - create a function constructor GameObject with parameter attributes
    - define prototype destroy
    - create CharacterStats Constructor function
    - inherit GameObject prototype methods
    - add prototype takeDamage
    - bind CharaterStats to GameObject using call binding
    - create Humanoid constructor function
    - bind GameObject to Humanoid using call
    - inherit prototype methods from CharacterStats
    - create prototype method greet to Humanoid
    - instantiate new Humanoid and invoke methods
    nobioma1 committed May 8, 2019
    Configuration menu
    Copy the full SHA
    2b1c815 View commit details
    Browse the repository at this point in the history
  4. STRETCH: create Hero and Villian

    - create Hero constructor function and inherit Humanoid attributes using call binding
    - inherit methods of Humanoid methods in Hero using Object.create
    - create method to reduce hero healthpoints or invoke the destroy method if healthpoints is less than or equal to 0
    - create Villian constructor function and inherit Humanoid attributes using call binding
    - inherit methods of Humanoid methods in Villian using Object.create
    - create method to reduce villian healthpoints or invoke the destroy method if healthpoints is less than or equal to 0
    - instanciate new Hero and new Villian
    - call name and invoke reduce methods for hero and villian
    nobioma1 committed May 8, 2019
    Configuration menu
    Copy the full SHA
    cca0138 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #1 from nobioma1/noble-obioma

    Project Solution JavaScript III
    SorinC6 authored May 8, 2019
    Configuration menu
    Copy the full SHA
    43e53dc View commit details
    Browse the repository at this point in the history
Loading