Part 3 Working With Strings - Second and second to last characters.

Open Beginner friendly
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
74/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
documentation

Research direction

Start by reviewing Part 3, “Working with Strings,” and the “Second and Second to Last Characters” exercise. Clarify the expected input length or explain how one-character and empty strings should be handled, and make sure the exercise no longer leaves the possible index-out-of-bounds case ambiguous.

Written by the indexing model from the issue text.

Description

This is not an error, but perhaps a clarification of instructions that could be included.

In part 3 Working with Strings, in the exercise called Second and Second to Last Characters, the question does not mention that the string inputs are at least two characters long, nor does it mention what to do if the string inputs were only one character long or an empty string (resulting in an index out of bounds error if [-2] is used as an index to get the second last characters.

This page raises the possiblity of an index out of bounds error before the exercise is attempted, so this possibility could be included in the exercise.
Alternatively, instructions could be provided that the input string is at least two characters to avoid hesitation.

Dominant language
JavaScript
Stars
77
Forks
30
PR merge metrics
No merged PRs in 30d

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.

More from rage/programming-26

All issues in rage/programming-26

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.