Skip to content

Manchester | 26-ITP-Jan | Farancis Dore Etonkie |Sprint 1 |Structuring and testing data#1211

Open
FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
FarancisGH:Coursework/Sprint-1
Open

Manchester | 26-ITP-Jan | Farancis Dore Etonkie |Sprint 1 |Structuring and testing data#1211
FarancisGH wants to merge 4 commits intoCodeYourFuture:mainfrom
FarancisGH:Coursework/Sprint-1

Conversation

@FarancisGH
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

  1. Adjustments made on how to count, initials, path, and randoms.
  2. Adjustment made on error corrections
  3. Adjustments made on interpretation.

@FarancisGH FarancisGH added 📅 Sprint 1 Assigned during Sprint 1 of this module 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. labels Mar 7, 2026
@kfklein15 kfklein15 requested review from hkavalikas and jennetturkkan and removed request for hkavalikas and jennetturkkan March 9, 2026 17:54
Copy link
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

I noticed some inconsistent spacing in the code.

Have you installed the prettier VSCode extension and enabled "Format on save/paste" on VSCode, as recommended in
https://github.com/CodeYourFuture/Module-Structuring-and-Testing-Data/blob/main/readme.md
?


// Line 1 is a variable declaration, creating the count variable with an initial value of 0
// Describe what line 3 is doing, in particular focus on what = is doing
//This means that increase the count number by 1 (by adding 1 to the initial number) and maintain the count value after adding 1. E.g 0+1 =1, so the new count now will be 1. No newline at end of file
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?


//This const minimum = 1; and this const maximum = 100; represent the range from which i want my random numbers to come from.

//This command Math.random() generates a random decimal number from 0(being inclusive) to 1(but not inclusing 1) e.g 0.23, 0.87, 0.001 or 0.999 but it will never generate 1.
Copy link
Contributor

Choose a reason for hiding this comment

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

Note:

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() generates a random decimal number in [0, 1).

Comment on lines -1 to 2
const cardNumber = 4533787178994213;
const cardNumber = "4533787178994213";
const last4Digits = cardNumber.slice(-4);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suppose you were not allowed to modify the statement const cardNumber = 4533787178994213;
(that is, keep the variable's value unchanged).
How would you modify the code (through type conversion) so that you can still use .slice(-4) to extract the last 4 digits from the given number.


// e) What do you think the variable result represents? Can you think of a better name for this variable?
// It creates a formated string. for example: 2:30:23. That is the movie duration formated in Hours:Minutes:Seconds.
//Better names could be; FormatedDuration or MovieDuration or FormatedTime.
Copy link
Contributor

Choose a reason for hiding this comment

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

All names look good.

Please note that in JS naming convention, variable names usually begins with a lowercase letter. Names starting with an uppercase letter are used for built-in and custom data types (e.g., Math)

@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 Mar 11, 2026
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. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants