Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo #3585

Closed
andreagoulet opened this issue Oct 5, 2015 · 0 comments
Closed

typo #3585

andreagoulet opened this issue Oct 5, 2015 · 0 comments

Comments

@andreagoulet
Copy link

Challenge Waypoint: Make Object Properties Private has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.99 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.

My code:

//Let's create an object with a two functions. One attached as a property and one not.
var Car = function() {
  this.gear = 1;
  function addStyle(styleMe){
    return 'The Current Gear Is: ' + styleMe;
  }
  this.getGear = function() {
    return addStyle(this.gear);
  };
};

var Bike = function() {
  // Only change code below this line.
  this.speed = 100;
  function addUnit(value) {
    return value + "KM/H";
  }

  getSpeed = function () {
    return addUnit(speed);
  };

};

// Only change code above this line.
var myCar = new Car();
var myBike = new Bike();

if(myBike.hasOwnProperty('getSpeed')){(function() {return JSON.stringify(myBike.getSpeed());})();};

There's a typo in the top comment. Instead of reading "Let's create an object with a two functions." it should read "Let's create an object with two functions."

josephbreihan added a commit to josephbreihan/FreeCodeCamp that referenced this issue Oct 5, 2015
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

No branches or pull requests

1 participant