Skip to content

Object Basics: Move array content to "Arrays and Loops" lesson #29521

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

MaoShizhong
Copy link
Contributor

@MaoShizhong MaoShizhong commented Mar 16, 2025

Because

The lesson contents on array methods in Object Basics is misplaced and would be better served in the Arrays and Loops lesson instead. This will keep both lessons more focused on relevant topics.

This PR

  • Moves all array method content and assignments in "Object Basics" to "Arrays and Loops"
    • "Object Basics" LO/KC amended accordingly.
    • Some restructuring of assignments/lesson bullets to for better flow of topics.
    • Added link to MDN Array docs for reference purposes.
    • Since it would be too much otherwise, some W3Schools array resources were removed in favour of the incoming javascript.info resources.
  • Tweaks some verbiage to move away from the idea of "mastering" anything and from the idea of "shorter is better", since code length is just an outcome of any given code and not actually the cause of more readable code.
  • Fixes some line breaks for better visuals when rendered on the site, and removes some redundant escape slashes.
  • Fixes some nested list indentation to match style guide (3 spaces for child of ordered list)

Issue

Closes #29500

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

Added link to MDN array docs for referencing.
Restructured main contents Array section bullets for a slightly more
logical order.
Follows lesson style guide for heading case
Hyphenated as "test-driven" is an adjective. This does not affect the ID
fragment used for the KC question link.
Single line breaks do not render any differently. Paragraphs should be
contained in their own lines and separated by a single blank line.

Small verbiage amendments to map/filter explanations to move language
away from "mastering" and "shorter means better".
@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Mar 16, 2025
@MaoShizhong
Copy link
Contributor Author

Opinion wanted:

With the array method contents now in the Arrays and Loops lesson, I feel like the section order (Arrays -> Loops -> Array method stuff) could flow better if Loops came first, followed by Arrays then the Array method stuff.

The array resources either mention loops or otherwise use looping concepts when demonstrating array methods. Meanwhile, the MDN loops resource (not the other one) only very briefly mention arrays, and not in an array method context, only to use a for..of loop for. I feel like going Loops first would make more sense, perhaps with a tiny note that arrays are just lists of things and we'll cover them in the next section. Feels better than going Arrays and methods first, which naturally include iteration, then introducing loops like they're completely separate.

If agreed, I can open a separate issue for this after this one is complete, and it might mean the lesson could do with renaming to "Loops and Arrays" (which would require a file name change, a link change in Object Basics (only place it's linked), and a change in the website repo for the title).

As per TheOdinProject#29500 (comment)
Not particularly relevant to the lesson (being an object alone isn't sufficient) and rest params are recommended instead for its purpose anyway.
Some exercises use arrays of objects - not appropriate to assign until
the Object Basics lesson.
@MaoShizhong MaoShizhong force-pushed the object-basics-arrays branch from 11df869 to 8f68735 Compare March 17, 2025 21:52
@wise-king-sullyman wise-king-sullyman self-requested a review March 18, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Foundations Involves the Foundations content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object Basics: Contents on array methods is misplaced
1 participant