Skip to content

London | 26-ITP-JAN | Shuheda Begum | Sprint 1 | Structuring and Testing Data#937

Open
codebyshay wants to merge 16 commits intoCodeYourFuture:mainfrom
codebyshay:coursework/sprint-1
Open

London | 26-ITP-JAN | Shuheda Begum | Sprint 1 | Structuring and Testing Data#937
codebyshay wants to merge 16 commits intoCodeYourFuture:mainfrom
codebyshay:coursework/sprint-1

Conversation

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

Did exercise 1.

Questions

N/A

Initials fixed
const dir and const ext
What does num represent with explanation
Adding // to make a comment or add instructions for human consumption.
let allows variable age, const does not.
Swapped the position of const from under the console to on top of the console to allow javascript to read it in order.
Add String to the cardNumber so javascript recognises it as a string and not just numbers, making it possible to slice.
SyntaxError fixed..twelve instead of 12 and twentyFour instead of 24
Answered all questions and added , to the function.
Answered questions
Explain each step one by one.
Answered questions and tried alert and prompt on chrome dev tool.
Completed dev tool exercise on chrome.
@codebyshay codebyshay added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Feb 10, 2026
@codebyshay codebyshay changed the title London | 26-ITP-JAN | Shuheda Begum | Sprint 1 | Sprint-1 London | 26-ITP-JAN | Shuheda Begum | Sprint 1 | Structuring and Testing Data Feb 10, 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 18, 2026
Comment on lines +6 to +8

// The code above will output 34, because we are reassigning the value of age to be the current value of age plus 1. So, 33 + 1 = 34.

Choose a reason for hiding this comment

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

Do you think the explanation provided here hit the major reason why the error was occurring even if you did the right thing in your code?

@@ -1,9 +1,12 @@
const cardNumber = 4533787178994213;
const last4Digits = cardNumber.slice(-4);
const last4Digits = String(cardNumber).slice(-4);

Choose a reason for hiding this comment

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

Now, you did the right thing by explaining your reasoning to debug the error. I would suggest applying a much cleaner way to convert the variable into a string without redeclaring it. You can look into that method using MDN docs.


// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer

// This code will work for all positive integer values of movieLength. It will correctly calculate the hours, minutes and seconds for any length of movie. However, if movieLength is negative or not an integer, the code may not work as intended. For example, if movieLength is -100, the calculations will not make sense in the context of a movie length. If movieLength is a decimal, it may also cause issues with the calculations. 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.

Have you considered if there could be some time formatting issues with smaller integer numbers?

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.

Great job so far; kindly look into the comments to make it better. Well done.

@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 18, 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

Comments