Skip to content

simplify: replace manual indexes array with Array.from#3

Open
jordankrueger wants to merge 1 commit into
mainfrom
simplify/donation-array-indexes
Open

simplify: replace manual indexes array with Array.from#3
jordankrueger wants to merge 1 commit into
mainfrom
simplify/donation-array-indexes

Conversation

@jordankrueger
Copy link
Copy Markdown
Member

Summary

  • Removes 2 lines from donationArray.readState() in playground/index.html
  • Replaces a manual for loop building an indexes array with Array.from({ length: count }, (_, i) => ...) directly in the buttons property
  • No behavior change — output is identical

Test plan

  • Open playground locally, switch to Donation array tab
  • Verify 3-button and 4-button configs render correctly
  • Verify "Other" button appends correctly
  • Amounts match button labels ($25, $50, $100, etc.)

@jordankrueger jordankrueger force-pushed the simplify/donation-array-indexes branch from f62e09b to 9fcde00 Compare May 22, 2026 14:39
@jordankrueger jordankrueger force-pushed the simplify/donation-array-indexes branch 2 times, most recently from 28a173f to 9a3fd1a Compare May 22, 2026 14:53
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.

1 participant