-
Notifications
You must be signed in to change notification settings - Fork 558
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
Objects: Change foobar to slightly better variables #373
Conversation
Foo.bar = 1; | ||
Foo.bar; // 1 | ||
function sayHello(){} | ||
sayHello.bar = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you missed a 'bar' :)
|
||
### Accessing Properties | ||
|
||
The properties of an object can be accessed in two ways, via either the dot | ||
notation or the square bracket notation. | ||
|
||
var foo = {name: 'kitten'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha - this is a great change. I wonder y someone decided on 'kitten' and stuck with foo as the variable name :D
@@ -63,21 +63,21 @@ operator; setting the property to `undefined` or `null` only removes the | |||
*value* associated with the property, but not the *key*. | |||
|
|||
var obj = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm less keen on this change. If we're not replacing 'foo' with something meaningful & realisitic, I think foo, bar, baz is actually preferable to 'a','b','c'. More people will realise it's an explicit 'name does not matter' placeholder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, that was the exact reason in my head to make it abc.
Because of this comment: #261 (comment)
foo and bar are specially confusing for non english speakers (like me) because we can't translate/understand these words
foo, bar, etc. might seem like they're supposed to make sense. abc are alphabets as placeholder 😅
Looks great, thanks! Would it be possible to take a look at the comments and make another PR too? |
Ref: #261
(only for english)