sorrycc / sorrycc/test

range(0, 5) includes the end value

Open Beginner friendly
#5 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

The docs say the end is exclusive, but:

import { range } from "./src/range";
console.log(range(0, 5));
// got:      [0, 1, 2, 3, 4, 5]
// expected: [0, 1, 2, 3, 4]

Also range(3, 3) returns [3] where I'd expect [].

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/range and reproduce the issue using the TypeScript example in the report. Check the range behavior for range(0, 5) and range(3, 3); done means the end value is excluded and an equal start and end returns an empty array.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Clearly specified
Newbie friendliness
85/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.