New feature request for loop - support initializer other than zero
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 641
- Avg merge
- 12h 4m
- Merged PRs (30d)
- 57
Description
It would be great to have a variable for both the start and end of the for loop block instead of having it with the default set to zero as it currently exists. It would also be great to have a ++ or -- option. While I know it's easy enough to jump into java and modify the loop, visually I prefer the graphic quality of the makecode page to only display the native components and not have custom code blocks.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start by locating the native for-loop block in the PXT editor and its TypeScript implementation, then determine how loop bounds and increment/decrement options are represented. Done should include a clearly scoped design and working native blocks for the requested initializer and increment behavior, with coverage in the relevant tests if they exist.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100