Skip to content

London | 26-ITP-May | Damilola Odumosu | Sprint 1 | Coursework#1364

Open
d-odumosu wants to merge 18 commits into
CodeYourFuture:mainfrom
d-odumosu:coursework/sprint-1
Open

London | 26-ITP-May | Damilola Odumosu | Sprint 1 | Coursework#1364
d-odumosu wants to merge 18 commits into
CodeYourFuture:mainfrom
d-odumosu:coursework/sprint-1

Conversation

@d-odumosu

@d-odumosu d-odumosu commented Jun 19, 2026

Copy link
Copy Markdown

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

I have completed the coursework requirements

@d-odumosu d-odumosu added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Jun 19, 2026
Comment thread Sprint-1/1-key-exercises/1-count.js Outdated
Comment thread Sprint-1/1-key-exercises/3-paths.js Outdated
Comment on lines +21 to +24
const dir = filePath.slice(1 , 44);
console.log(dir)
const ext = filePath.slice(lastSlashIndex + 5 );
console.log(ext)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could you explore an approach that could work for any valid file path? For examples,
/tmp/interpret/file.json and /Users/mitch/cyf/Module-JS1/mycode.js.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i have implemented this using indexof and slice

Comment thread Sprint-1/2-mandatory-errors/4.js Outdated
Comment on lines +1 to +2
const _12HourClockTime = "8:53pm";
const $24hourClockTime = "20:53";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Identifiers that begin with _ or $ are valid variable, function, class, and property names. However, they are usually used by convention to signal special meaning.

Could you explore names that start with alphabets instead? Feel free to ask AI for suggestion.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

i'll change them to twelveHourClockTime, TwentyfourHourClockTime.

// line 12 console,log()

// 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?
//A syntaxError is occurring on line 5, we are missing a "," and a closing ")"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can more precisely describe "A comma is missing between "," and "" in the function call" as:
A comma is missing between the ___________s.

What is the programming term that belongs in the blank?

Note: The original code does not have a missing closing ")".

Copy link
Copy Markdown
Author

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 the arguments

Comment on lines +24 to +31

//runTime

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

runTime reads like "runtime", which has a different meaning in IT. Could you suggest a different (and more descriptive) name?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I have gone with movieRuntime, other variables could be movieLength, movieDuration

@cjyuan

cjyuan commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Regarding your PR description, could you update the checkboxes to make them look like

  • My changes meet the requirements of the task

instead of like

  • [ x ] My changes meet the requirements of the task

Relevant resource: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/about-tasklists

@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 Jun 23, 2026
Comment thread Sprint-1/1-key-exercises/3-paths.js Outdated
Comment thread Sprint-1/2-mandatory-errors/4.js Outdated
Comment on lines +1 to +5
const _12HourClockTime = "8:53pm";
const $24hourClockTime = "20:53";

//when starting a variable name with a number we have to precede with either of _ or $ No newline at end of file
//when starting a variable name with a number we have to precede with either of _ or $
// No newline at end of file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Identifiers that begin with _ or $ are valid variable, function, class, and property names. However, they are usually used by convention to signal special meaning.

Could you explore names that start with alphabets instead? Feel free to ask AI for suggestion.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

twentyFouHourClockTime and twelveHourClockTime

Comment thread Sprint-1/1-key-exercises/3-paths.js Outdated
// Create a variable to store the ext part of the variable
const firstSlash = filePath.indexOf("/");
const firstSlashIndex = filePath.indexOf("/");
const period = filePath.indexOf(".");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

A folder name may contain a '.'. A more robust approach would be to search for the last (instead othe first) instance of '.' in the path.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you, i have implemented this

Comment thread Sprint-1/1-key-exercises/3-paths.js Outdated
const seventhSlash = filePath.indexOf("/", sixthSlash + 1);
const eighthSlash = filePath.indexOf("/", seventhSlash + 1);

const dirPath = filePath.slice(firstSlashIndex,lastSlashIndex + 1)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

According to the diagram, the value of dir does not include a trailing '/'.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

made this changes, thank you

@d-odumosu d-odumosu added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. 📅 Sprint 1 Assigned during Sprint 1 of this module Module-Structuring-And-Testing-Data The name of the module. and removed Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jul 17, 2026

@cjyuan cjyuan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes look good.


// e) What do you think the variable result represents? Can you think of a better name for this variable?
//runTime
//movieRunTime

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could also add a prefix formatted or a suffix Str to hint the variable stores a string.

@cjyuan cjyuan added Reviewed Volunteer to add when completing a review with trainee action still to take. Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Reviewed Volunteer to add when completing a review with trainee action still to take. labels Jul 17, 2026
@d-odumosu

Copy link
Copy Markdown
Author

Thank you so much for your time reviewing my pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants