Skip to content

Commit dc05100

Browse files
committed
completed 3-to-pounds.js with comments explanation 2
1 parent 3b4e990 commit dc05100

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Sprint-1/3-mandatory-interpret/2-time-format.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ console.log(result);
3131
// It is converting the seconds to minutes and rounding it to the last whole minute.
3232

3333
// e) What do you think the variable result represents?
34-
//*Answer
34+
// *Answer
3535
// The result is the duration of the film in hours, minutes and seconds - 2:26:24.
3636

3737
// Can you think of a better name for this variable?

Sprint-1/3-mandatory-interpret/3-to-pounds.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,9 @@ console.log(`£${pounds}.${pence}`);
2525

2626
// To begin, we can start with
2727
// 1. const penceString = "399p": initialises a string variable with the value "399p"
28+
29+
// 2. const penceStringWithoutTrailingP = penceString.substring(0, penceString.length - 1);
30+
// This takes the variable penceString from the start of the string index(0) to 1 before the end
31+
// and stops ie index (-1). and drops the last indexed character "p".
32+
33+
// 3.

0 commit comments

Comments
 (0)