Skip to content

feature/added links for Objects Properties Private challenge #7620

Merged
merged 2 commits into from

3 participants

@kalunlee136

added links regarding the 'this' keyword for clarification. This closes #7282.

@camperbot

@kalunlee136 thanks for the PR.
Your branch name should start with one of fix/, feature/, translate/ prefixes. Name, your branches correctly next time, please.
Do not include issue numbers and following keywords in commit messages.
Please, review our Guidelines for Contributing, thank you!.

@raisedadead raisedadead commented on an outdated diff
...ation/object-oriented-and-functional-programming.json
"We can also create <code>private properties</code> and <code>private methods</code>, which aren't accessible from outside the object.",
"To do this, we create the variable inside the <code>constructor</code> using the <code>var</code> keyword we're familiar with, instead of creating it as a <code>property</code> of <code>this</code>.",
"This is useful for when we need to store information about an object but we want to control how it is used by outside code.",
"For example, what if we want to store the <code>speed</code> our car is traveling at but we only want outside code to be able to modify it by accelerating or decelerating, so the speed changes in a controlled way?",
"In the editor you can see an example of a <code>Car</code> <code>constructor</code> that implements this pattern.",
- "Now try it yourself! Modify the <code>Bike</code> <code>constructor</code> to have a <code>private property</code> called <code>gear</code> and two <code>public methods</code> called <code>getGear</code> and <code>setGear</code> to get and set that value."
+ "Now try it yourself! Modify the <code>Bike</code> <code>constructor</code> to have a <code>private property</code> called <code>gear</code> and two <code>public methods</code> called <code>getGear</code> and <code>setGear</code> to get and set that value.",
+ "<a href='https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/this'>Further explanation on the <code>this</code> keyword</a>"
@raisedadead
Free Code Camp member

Grammar : Drop the "the"

Further explanation on the this keyword

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@raisedadead
Free Code Camp member

@kalunlee136 Address the comment above.

Once ready you can update the PR:
Amend your commit git commit --amend
Push with force update git push <remotename> <branchname> -f

@camperbot

@kalunlee136 updated the pull request.

@kalunlee136

@raisedadead I updated the PR with the changes from your comment.

@raisedadead raisedadead removed the blocked label
@camperbot

@kalunlee136 updated the pull request.

@raisedadead
Free Code Camp member

LGTM. :+1:

@raisedadead raisedadead merged commit cf9c82e into FreeCodeCamp:staging

1 check passed

Details continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.