Barcelona| Class-Oct2025-1| Gbemisola Ikuegbuwa | Sprint-1| Structuring-And-Testing-Data Coursework/sprint 1 - #1
Open
Gbemisola-Fad wants to merge 13 commits into
Open
Barcelona| Class-Oct2025-1| Gbemisola Ikuegbuwa | Sprint-1| Structuring-And-Testing-Data Coursework/sprint 1 #1Gbemisola-Fad wants to merge 13 commits into
Gbemisola-Fad wants to merge 13 commits into
Conversation
Jezorko
approved these changes
Jan 6, 2026
| console.log(indexOfDir) | ||
|
|
||
| // https://www.google.com/search?q=slice+mdn No newline at end of file | ||
| let dir = pathToDir.slice(indexOfDir + 1) |
| @@ -6,4 +6,8 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; | |||
| // In this exercise, you will need to work out what num represents? | |||
| vi. const result */ | ||
|
|
||
| // b) How many function calls are there? | ||
| /* There is only 6 function call in the program and the call is console.log(result)*/ |
There was a problem hiding this comment.
Fun fact: there are more than 6 function calls, but some of them are implicit. For example, string interpolation at line 9 calls the
toString method:
const example = {
toString: () => {
console.log("toString called!");
return "example";
}
};
console.log(`${example}`);This will print
toString called!
example
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer No newline at end of file | ||
| // e) What do you think the variable result represents? Can you think of a better name for this variable? | ||
| /* The variable result represent the movie duration formatted as a time string in the structure Hours:Minutes:Seconds ("2:26:24"). | ||
| A better descriptive name for this variable for me would be "timeString". */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.