You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// 1. const penceString = "399p": initialises a string variable with the value "399p"
28
+
// line 3: calling substring method to remove the 'p' letter and keep only digits in the string
29
+
// line 8: using padstart method to make the minimum length of the string to 3 characters by adding one zero or two to the left.
30
+
// line 9: using substring method to take only the integer part
31
+
// line 14: using substring method to take only the decimal part and padend method to make the minimum length of pence to 2 characters by adding zero to the right
32
+
// line 18: calling console function to print the integer part that represents the pound and the decimal part that represents the pence seprated by point
0 commit comments