Skip to content

Conversation

@kohanman
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

Completed all the coursework exercises in Sprint 1 of Module Structuring and Testing Data

Questions

no questions atm

@kohanman kohanman added 🦔 Size Tiny Less than 30 minutes Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. 🐂 Size Medium 1-4 hours and removed 🦔 Size Tiny Less than 30 minutes labels Oct 31, 2025
@kohanman kohanman added 📅 Sprint 1 Assigned during Sprint 1 of this module 🐇 Size Small Around an hour and removed 🐂 Size Medium 1-4 hours labels Nov 1, 2025
Comment on lines +7 to +8
// The = operator is used to assign the new count variable as the original count + 1.
// testing commit
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 7 to +8

let initials = ``;
let initials = firstName.slice(0, 1)+middleName.slice(0, 1)+lastName.slice(0, 1);
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a shorter syntax to refer to the first character in a string.


console.log(num);

//Math.random generates a decimal number between 0 and 1
Copy link
Contributor

Choose a reason for hiding this comment

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

Phrases like "a number between X and Y" are not precise enough in a program specification, because they do not clearly state whether the endpoints X and Y are included.

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

  • [, ] => inclusion
  • (, ) => exclusion

If we want to denote "x in the range 1 < x <= 100", we can say x is in the interval (1, 100].

Can you use this notation to describe the returned value of Math.random()?

// so total 5 function calls

// b) Run the code and identify the line where the error is coming from - why is this error occurring? How can you fix this problem?
// error is in line 5, because of a missing , in replaceAll("," ""), which I will add to fix the problem.
Copy link
Contributor

Choose a reason for hiding this comment

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

In the function call .replaceAll(",", ""), there's a programming term for "," and "" (the values passed into the function).

Could you find out what they are called so that you can more precisely indicate where the , is missing.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Structuring-And-Testing-Data The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 🐇 Size Small Around an hour 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants