Skip to content

bugfix/arrays and two pointers#80

Merged
gcziprusz merged 5 commits intoNSS-Workshops:developfrom
bobbybaxter:bugfix/arrays-and-two-pointers
Feb 16, 2026
Merged

bugfix/arrays and two pointers#80
gcziprusz merged 5 commits intoNSS-Workshops:developfrom
bobbybaxter:bugfix/arrays-and-two-pointers

Conversation

@bobbybaxter
Copy link
Contributor

Details

fixed Exercise typo

  • fixed all of the instances where "Exercise" was misspelled as "Excersize"

fixed array-core-operations exercise 4 test scenario

  • in 04-arrays-and-two-pointers/03-array-core-operations/tests.js, on line 131, the expected array was empty, but given the test scenario, it should be ["C"] because the test has removed D, A, and B from the array, leaving C.

fixed incorrect escaping in array-methods

  • in 04-arrays-and-two-pointers/05-array-methods/index.md, many characters were incorrectly escaped, which broke the UI

fixed array-core-operations starterCode function all

  • in 04-arrays-and-two-pointers/03-array-core-operations/starterCode.js, on line 48, the function's argument list (setlist, song, position) were called in the incorrect order.

fixed solution for array-methods exercise 1b

  • in 04-arrays-and-two-pointers/05-array-methods/solution.js, on lines 20-22, the example adds the openers using a forEach loop, which reverses the order of the openers of the array argument. to pass the tests, the original order must be maintained, so I used the rest operator to splat newOpeners array to the front of the array.

Suggested Changes (not changed in this PR)

  • in 04-arrays-and-two-pointers/05-array-methods/starterCode.js
    • for Test Exercise 1b, I feel there could be more clarity on the purpose/use of the finishedActs param. It seems obviously after viewing the solution, but it wasn't exactly clear when to me when working on it that I needed to create a loop that ran as many times as finishedActs to execute shift(); Maybe it would help to adjust the instruction comment, on line 13, to something like:
        // Use shift() to remove finished acts using the amount of finishedActs
    • for Test Exercises 2a and 2b, the tests have very specific requirements that the starter code instructions don't explain at all.
      • the comments say the venueType can be "rock", "jazz", or "electronic" but the tests require the song.venue to specifically be "Rock Venue", "Jazz Venue", and "Electronic Venue"
      • the comments vaguely say to "transform duration" but the tests require specific duration values
      • the comments only say that eventType can be "wedding", "corporate", "festival" but the tests require specific criteria not covered in the instruction material like wedding songs should include songs that have "romantic" or "peaceful" moods, etc.
    • for Test Exercise 3b, the output for calculateBusinessMetrics requires a specific schema that isn't specified in the starter code and doesn't match the example given in the learning material
    • for Test Exercise 4a, the criteria is a little misleading. the instructional comment gives us the schema/type of criteria but doesn't specify that preferredMood is an optional param. there's a test scenario where the preferredMood param is excluded from the passed in criteria argument.
      • maybe line 87 could be changed to:
          // criteria: { maxDuration: number, preferredMood?: string, maxSongs: number }

@gcziprusz gcziprusz self-requested a review February 16, 2026 15:49
Copy link
Contributor

@gcziprusz gcziprusz left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for the contribution.
The automation only failed because the fork is outside the org where our aws secrets live.

@gcziprusz gcziprusz merged commit a93fc19 into NSS-Workshops:develop Feb 16, 2026
1 of 2 checks passed
@gcziprusz
Copy link
Contributor

Thanks for the suggestions, created tickets for those to be addressed also!

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.

2 participants