hemanth / hemanth/functional-programming-jargon

Inaccuracy in the "Constants" section

Open
#55 3 comments 7 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
18.7k
Forks
1k
PR merge metrics
No merged PRs in 30d

Description

From the section on constants:

With the above two constants the following expression will always return true.

john.age + five === ({name: 'John', age: 30}).age + (5)

This above statement isn't true; while john is declared as a constant; that only means that john can't be replaced with a different object, not that its fields can't be modified. A simple john.age = 10 would cause the above expression to return false, despite the definition of john as a constant.

Contributor guide

Open the contributing guide

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 by locating the "Constants" section in the project documentation and review the quoted expression alongside its explanation. Verify the behavior when the object's age property changes, then revise the section so the claim about constants is accurate. Done means the example and surrounding explanation no longer imply that object fields are immutable.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.