-
-
Notifications
You must be signed in to change notification settings - Fork 398
London | 26-ITP-May | Anita Amirhaeri | Sprint 1 | Structuring-and-Testing-Data #1566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
3ff62a2
d314db4
7be66ff
3630054
b70418f
a9900d8
3bb4629
3629cf5
c66d6a4
5e59c8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,4 @@ | ||
| /* | ||
| 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? | ||
| We don't want the computer to run these 2 lines - how can we solve this problem? | ||
| */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,3 +23,12 @@ console.log(result); | |
| // e) What do you think the variable result represents? Can you think of a better name for this variable? | ||
|
|
||
| // f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer | ||
| /* | ||
| a) There are 6: movieLength, remainingSeconds, totalMinutes, remainingMinutes, totalHours, result. | ||
| b) There is one: console.log. | ||
| c) It is taking the movieLength and doing a remainder that is showing what is left after the vaule has been divided, in this case wil be 84. | ||
| I found the info here https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Remainder | ||
| d) It is removing any extra seconds from the division by 60 so that is is showing as whole numbers without decimals. | ||
| e) Result is showing the movies duration but broken down to hours:minutes:seconds, I think it should be movieDuration to help describe it better. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The name Could you suggest a more descriptive name?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I can suggest movieFullDuration
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ideally the name could suggest the value is a string (and not a number). For example, add a "formatted" prefix or "Str" suffix. |
||
| f) Yes, it does work to show the lenght even if it is only in one section, though it does show values of 0, could clean it up to show nothing. | ||
| */ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: For integers,
[minimum, maximum + 1)could also be expressed as[minimum, maximum].