Skip to content

London | ITP- Jan- 2026 | Ping Wang | Sprint 1 | coursework#928

Open
pathywang wants to merge 33 commits intoCodeYourFuture:mainfrom
pathywang:coursework/sprint-1
Open

London | ITP- Jan- 2026 | Ping Wang | Sprint 1 | coursework#928
pathywang wants to merge 33 commits intoCodeYourFuture:mainfrom
pathywang:coursework/sprint-1

Conversation

@pathywang
Copy link

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

i completed task as required and checked with Node as many as i can in order to fully understand the concepts and knowledge

@github-actions

This comment has been minimized.

@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 3, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 3, 2026
@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 3, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 3, 2026
@pathywang pathywang changed the title London | ITP- Jan- 2016 | Ping Wang | Sprint 1 | coursework London | ITP- Jan- 2026 | Ping Wang | Sprint 1 | coursework Feb 4, 2026
@github-actions

This comment has been minimized.

@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 4, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 4, 2026
@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 7, 2026
@github-actions

This comment has been minimized.

@github-actions github-actions bot removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 7, 2026
@pathywang pathywang added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 7, 2026
@Theoreoluwa Theoreoluwa added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Feb 15, 2026
Comment on lines +8 to +10
let initials = firstName[0]+middleName[0]+lastName[0];

console.log(initials)

Choose a reason for hiding this comment

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

Yes, your code runs with the desired output, but it is best practice to try to follow the provided template for you in the task. A variable was initialised as a template literal, but your solution provides another way to do it.

Comment on lines +24 to +25
console.log(`The dir part of ${filePath} is ${dir}`);
console.log(`The ext part of ${filePath} is ${ext}`);

Choose a reason for hiding this comment

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

Achieved the right output. But it might be best practice to not include the filePath in your console.log to make the output more readable.

Comment on lines +11 to +17
// Try logging the value of num and running the program several times to build an idea of what the program is doingnum reprents the number is randomly generated whole number betweeb 1 and 100,inclusive range is between 0 and 99.99999

//Math.random() returns a random decimal between 0(inclusive) and 1(exclusive). while maximum-minimum +1=100, Math.random()*(maximum-minimum+1)

//Due to that Math.floor(...) rounds down the decimal to the nearest whole number.From this Stage, we have interger between o and 99.After + minimum, the range is between 1 and 100.
//This is classcial expressions for generating a random integer between two values- between 1 and 100, inclusive in this function.
//This kind of expression is commonly used for things like: rolling dice,random quiz questions, game mechanics.

Choose a reason for hiding this comment

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

Good breakdown, but it can be better improved by beginning with the operation in the parenthesis first.

// This is just an instruction for the first activity - but it is just for human consumption
// We don't want the computer to run these 2 lines - how can we solve this problem?

In JavaScript, we put // in front of sentence which is only for human to read. No newline at end of file

Choose a reason for hiding this comment

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

Correct. But, don't you think the whole of line 4 should be a comment?

Comment on lines +12 to +21
const cardNumber=4533787178994213;

//then convert to string
const last4Digits = cardNumber.toString().slice(-4);
console.log(last4Digits);

// or i can put quotes on cardNumber which will be string
const cardNumber1 ="4533787178994213"
const last4Digits1 = cardNumber1.slice(-4);
console.log(last4Digits1) No newline at end of file

Choose a reason for hiding this comment

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

Good initiative shown by executing the task in more than one way.

Comment on lines +24 to +27
//a: There are three function calls, which are: Number(...), replaceAll(...) and console.log(...)
// Function call lines: 1. carPrice = Number(carPrice.replaceAll(",", ""));
// 2. priceAfterOneYear = Number(priceAfterOneYear.replaceAll("," ""));
// 3. console.log(`The percentage change is ${percentageChange}`);

Choose a reason for hiding this comment

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

Yes, the function call lines are right. But, look at each line again and see if there are some repeated method calls that might increase your current number.

Comment on lines +37 to +38
// Answer e: this builds a string representing the time in HH:MM:SS format, based on the movie length in seconds. The better name can be
// formattedTime or timeString.
Copy link

@Theoreoluwa Theoreoluwa Feb 16, 2026

Choose a reason for hiding this comment

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

A name with the existing code context would be better practice.

Comment on lines +27 to +37
>let myName = prompt("What is your name?");
the pop up box:chrome://new-tab-page says, i ignore blue box just press cancel,
<.console.log("Your name is:", myName);
VM255:2 Your name is: null
undefined
>let myName = prompt("What is your name?");
in pop up box: chrome://new-tab-page says, i put my name'ping' in blue box then press ok
<.console.log("Your name is:", myName);
VM259:2 Your name is: ping
undefined
The value returned from prompt() is stored in the variable myName. The pop up box pauses the JS execution until i press the button either'cancel' or put my name before press'OK'.

Choose a reason for hiding this comment

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

You need to grant the required permissions on your computer before running this on your chrome devtools. That way, you will get the right output and document it properly.

Copy link

@Theoreoluwa Theoreoluwa left a comment

Choose a reason for hiding this comment

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

Well done. Please, look at the comments made and make the necessary adjustments as soon as you can. Rooting for you!

@Theoreoluwa Theoreoluwa added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Feb 16, 2026
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 with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants