Skip to content

LONDON | ITP_MAY | Mirabel Adom | Module-Structuring-and-Testing-Data | Sprint-1 #619

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

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

Mirabel-Adom
Copy link

@Mirabel-Adom Mirabel-Adom commented Jun 28, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with REGION | COHORT_NAME | FIRST_NAME LAST_NAME | PROJ_NAME
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Briefly explain your PR.

In this project, I’ve used JavaScript to explore foundational concepts such as values and variables. I’ve also tackled various challenges, including fixing errors in code, interpreting expressions and operators, and using tools like Chrome DevTools to practice working with the console.

Questions

Ask any questions you have for your reviewer.

@Mirabel-Adom Mirabel-Adom added the Needs Review Participant to add when requesting review label Jun 28, 2025
@Mirabel-Adom Mirabel-Adom changed the title Coursework/sprint-1 LONDON | ITP_MAY | Mirabel Adom | Module-Structuring-and-Testing-Data | Sprint-1 Jun 28, 2025
@cjyuan cjyuan added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Participant to add when requesting review labels Jul 6, 2025
Comment on lines +5 to +6
//In line 3, the assignment operator, '=' assigns the value 'count + 1' to the variable: 'count'.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Operation like count = count + 1 is very common in programming, and there is a programming term describing such operation.

Can you find out what one-word programming term describes the operation on line 3?

Comment on lines +18 to +19
* - Returns a pseudo-random floating-point number between 0 (inclusive) and 1 (exclusive).
* - E.g., 0.000... to 0.999...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can also use the concise and precise interval notation to describe a range of values.

  • [, ] => inclusion
  • (, ) => exclusion
    For example, we can say, "Math.random() returns a random number in the interval [0, 1)"

Comment on lines +24 to +26
//Answer:
//There was an error in line 5 because a comma was missing.
// Instead of the original example in line, which was: replaceAll(", " "")). I inserted a comma in order to fix the code: replaceAll(", ", ""));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A comma is missing between "," and "" in the function call.
Can you find out the programming term for "," and "" so that we can more accurately describe
"a comma is missing between the ___________."

Comment on lines +42 to +45
//5. const pence = paddedPenceNumberString .substring(paddedPenceNumberString.length - 2) .padEnd(2, "0");
// This gets the last two digits from the string to show the pence.
// If the result is only one digit, it adds a zero at the end to make it two digits.
// In this case, "399" gives us "99", so nothing additional is added.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we expect this program to work as intended for any valid penceString if we deleted .padEnd(2, "0") from the code?
In other words, do we really need .padEnd(2, "0") in this script?

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Jul 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Reviewed Volunteer to add when completing a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants