-
Notifications
You must be signed in to change notification settings - Fork 480
Rework javascript-101/arrays.md
#88
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
Conversation
Awesome! You picked a great thing to just acclimate yourself, and this is a healthy improvement. This isn't documented anywhere yet, so you couldn't 'have possibly known to do it, but can you adjust the YAML to the following format: attribution:
- jQuery Fundamentals
- Stefan Baumgartner
github: ddprrt The 'github' param controls, right now, whose avatar shows up on the article, which your contribution certainly merits already. I'll also leave some additional edits as line notes. Thanks for jumping in and helping out! |
are some subtle differences. | ||
|
||
To create an array you can either use the object constructor or the literal declaration, | ||
by assign your variable a list of values right after the declaration. |
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.
assigning, not assign
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.
We should really slam home the fact that the literal is strongly preferred
Food for thought.... |
can include multiple types of items, including other arrays. | ||
can include multiple types of items, including other arrays. Arrays in Javascript | ||
work bascially like in most other programming or scripting languages, although there | ||
are some subtle differences. |
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 not sure this sentence is necessary, unless we actually plan to explain the subtle differences that exist at some point in the article.
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.
Agreed. My first attempt on writing this article was more on focussing on the differences for programmers who didn't get in contact with JS yet, but then I thought I might miss the point
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.
bascially => basically
Wow! Thanks for the quick answer! I thought that the Arrays article might me a good starting point, for me and a rework of the JavaScript 101 section in general. I share your point in expanding with "applied" examples, but I'm not quite sure if we should mix in jQuery examples at that point, but focussing on a seperate "Arrays and jQuery" chapter later on. I don't know if the jQuery object is discussed in a later chapter, but I'm all for explaining it as much in-depth as possible. jQuery is a mighty tool, but can be so mis-used if you don't know what's inside. Since this is a learning documentation, we should keep in mind that alot of complete JS/Web development beginners will go for that. |
Hey @ddprrt. Really great work on this so far! In my opinion, we perhaps shouldn't be mixing in jQuery examples with the JS101 section (just yet).
I think separated out makes the most sense here. Ideally we don't want to confuse people who are looking at anything to do with jQuery for the first time when teaching them JS fundamentals. Would it be overkill for us to also make a reference to There's also an argument for including `for( x in y)``, but we can do whatever you guys feel avoids confusion. @ddprrt if you could check your changes against latest that would be great. At present this PR can't be automatically merged in (even though I know there's still work to be done on it) :) |
+1 for explanation of .forEach |
+1 for native .forEach |
Hello everyone! I added for...in and forEach to the article. For now I left out "applied" array examples, mostly because I didn't come up with an example that hasn't either jQuery content or some kind of pattern in it (was thinking about animation queues filled up on user interaction). @addyosmani Hope I did everything right, should by now up to date with upstream :-)
Totally agree |
Merging now! Thanks. In the future please do not commit directly to master, thanks! :) |
Rework `javascript-101/arrays.md`
Rework `javascript-101/arrays.md`
Did a complete rework of the Array section (for starters, just to get used to the environment). And tried to explain each Array method.