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

[javascript/en] Added for/in loop JavaScript #1372

Merged
merged 3 commits into from
Oct 9, 2015

Conversation

raphaelbn
Copy link
Contributor

For/In loop JavaScript

For/In loop JavaScript
@raphaelbn raphaelbn changed the title Update javascript.html.markdown [javascript/en] Added for/in loop JavaScript Oct 7, 2015
@daisylb
Copy link
Collaborator

daisylb commented Oct 7, 2015

Hi,

Thanks for the contribution!

IMO, it'd be a good idea to at least mention the fact that this iterates over every property across the entire prototype chain, the existence of hasOwnProperty, and the fact that lists won't be iterated over in-order, especially since Python has the same for ... in syntax but works differently.

@raphaelbn
Copy link
Contributor Author

Hi @adambrenecki,

Thanks for your attention!

I will update with yours suggestion and commit.

more explanation about for/in java script.
@raphaelbn
Copy link
Contributor Author

Hi @adambrenecki, I've already made the PR with your suggestions.

var description = "";
var person = {fname:"Paul", lname:"Ken", age:18};
for (var x in person) {
if( person.hasOwnProperty( x ) ) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the code style

Fixing code style
@raphaelbn
Copy link
Contributor Author

Is it ok now, @vendethiel ?

@levibostian
Copy link
Collaborator

Thanks!

levibostian added a commit that referenced this pull request Oct 9, 2015
[javascript/en] Added for/in loop JavaScript
@levibostian levibostian merged commit bd56a72 into adambard:master Oct 9, 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

Successfully merging this pull request may close these issues.

4 participants