File tree Expand file tree Collapse file tree
Sprint-3/3-mandatory-implement Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44// You will need to declare a function called toPounds with an appropriately named parameter.
55
66// You should call this function a number of times to check it works for different inputs
7- function toPound ( penceString ) {
7+ function toPounds ( penceString ) {
88 const penceStringWithoutTrailingP = penceString . substring (
99 0 ,
1010 penceString . length - 1 ,
@@ -19,8 +19,8 @@ function toPound(penceString) {
1919 . padEnd ( 2 , "0" ) ;
2020 return `£${ pounds } .${ pence } ` ;
2121}
22- console . log ( toPound ( "399p" ) ) ;
23- console . log ( toPound ( "2p" ) ) ;
24- console . log ( toPound ( "4500p" ) ) ;
25- console . log ( toPound ( "95p" ) ) ;
26- console . log ( toPound ( "3675p" ) ) ;
22+ console . log ( toPounds ( "399p" ) ) ;
23+ console . log ( toPounds ( "2p" ) ) ;
24+ console . log ( toPounds ( "4500p" ) ) ;
25+ console . log ( toPounds ( "95p" ) ) ;
26+ console . log ( toPounds ( "3675p" ) ) ;
You can’t perform that action at this time.
0 commit comments