feature/added links for Objects Properties Private challenge #7620
+3
−2
kalunlee136
commented
camperbot
commented
@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
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>" |
Grammar : Drop the "the"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
|
@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
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
added links regarding the 'this' keyword for clarification. This closes #7282.