File tree Expand file tree Collapse file tree 2 files changed +5
-6
lines changed
Sprint-1/3-mandatory-interpret Expand file tree Collapse file tree 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ console.log(result);
2626//This expression calculates the total full minutes in the movie by removing leftover seconds and converting seconds to minutes.
2727
2828// e) What do you think the variable result represents? Can you think of a better name for this variable?
29- //result represent the total movie length using hours,minutes and seconds,the better name can be totalMovieLength .
29+ //result represent the total movie length using hours,minutes and seconds,the better name can be totalMovieDuration .
3030
3131// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
3232/*the code works for different values of movieLength it present the input movieLength by calculating the remainder and subtracting
Original file line number Diff line number Diff line change 1- const penceString = "399p " ;
1+ const penceString = "0p " ;
22
33const penceStringWithoutTrailingP = penceString . substring (
44 0 ,
@@ -11,10 +11,9 @@ const pounds = paddedPenceNumberString.substring(
1111 paddedPenceNumberString . length - 2
1212) ;
1313
14- const pence = paddedPenceNumberString
15- . substring ( paddedPenceNumberString . length - 2 )
16- . padEnd ( 2 , "0" ) ;
17-
14+ const pence = paddedPenceNumberString . substring (
15+ paddedPenceNumberString . length - 2
16+ ) ;
1817console . log ( `£${ pounds } .${ pence } ` ) ;
1918
2019// This program takes a string representing a price in pence
You can’t perform that action at this time.
0 commit comments