Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JS Basics- Problem Solving: Fix incorrect interpretation #29049

Closed
wants to merge 1 commit into from

Conversation

bhagyeshsp
Copy link

The current explanation tells that the loop continues until the value of i is greater than the value of answer. But in fact, the parameter condition is i <= answer. Hence, the correction.

Because

The incorrect interpretation of i <= answer condition is fixed.

This PR

  • Replaced only a few words in the same line

Issue

Closes #XXXXX

Additional Information

Pull Request Requirements

  • I have thoroughly read and understand The Odin Project curriculum contributing guide
  • The title of this PR follows the location of change: brief description of change format, e.g. Intro to HTML and CSS lesson: Fix link text
  • The Because section summarizes the reason for this PR
  • The This PR section has a bullet point list describing the changes in this PR
  • If this PR addresses an open issue, it is linked in the Issue section
  • If any lesson files are included in this PR, they have been previewed with the Markdown preview tool to ensure it is formatted correctly
  • If any lesson files are included in this PR, they follow the Layout Style Guide

The current explanation tells that the loop continues until the value of `i` is greater than the value of `answer`. But in fact, the parameter condition is `i <= answer`. Hence, the correction.
@github-actions github-actions bot added the Content: Foundations Involves the Foundations content label Nov 4, 2024
@MaoShizhong
Copy link
Contributor

The current wording is correct. The condition part of a loop tells us the condition that the loop keeps going. So i <= answer means "keep looping while i is less than or equal to answer" which is the same as "loop until i is greater than answer".

@MaoShizhong MaoShizhong closed this Nov 4, 2024
@bhagyeshsp
Copy link
Author

Oops! Apologies for raising the false flag.
I will have to double-triple check before raising the PR in the future.
Thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content: Foundations Involves the Foundations content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants