diff --git a/Sprint-1/errors/3.js b/Sprint-1/errors/3.js index ffa72ca4d..ec101884d 100644 --- a/Sprint-1/errors/3.js +++ b/Sprint-1/errors/3.js @@ -3,5 +3,7 @@ const last4Digits = cardNumber.slice(-4); // The last4Digits variable should store the last 4 digits of cardNumber // However, the code isn't working -// Make and explain a prediction about why the code won't work +// Before running the code, make and explain a prediction about why the code won't work +// Then run the code and see what error it gives. +// Consider: Why does it give this error? Is this what I predicted? If not, what's different? // Then try updating the expression last4Digits is assigned to, in order to get the correct value diff --git a/Sprint-1/exercises/decimal.js b/Sprint-1/exercises/decimal.js index c928eb947..143e1c2ac 100644 --- a/Sprint-1/exercises/decimal.js +++ b/Sprint-1/exercises/decimal.js @@ -1,4 +1,4 @@ -const num = 58.4567; +const num = 56.4567; // You should look up Math functions for this exercise https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math diff --git a/Sprint-1/exercises/initials.js b/Sprint-1/exercises/initials.js index c8c68ffe6..6b80cd137 100644 --- a/Sprint-1/exercises/initials.js +++ b/Sprint-1/exercises/initials.js @@ -2,5 +2,5 @@ let firstName = "Creola"; let middleName = "Katherine"; let lastName = "Johnson"; -// Declare a variable called initials that stores the first 3 characters of each string in upper case -// Log the variable in each case +// Declare a variable called initials that stores the first character of each string. +// This should produce the string "CKJ", but you must not write the characters C, K, or J in the code of your solution. diff --git a/Sprint-1/exercises/random.js b/Sprint-1/exercises/random.js index 79a4a4d53..292f83aab 100644 --- a/Sprint-1/exercises/random.js +++ b/Sprint-1/exercises/random.js @@ -6,4 +6,4 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; // In this exercise, you will need to work out what num represents? // Try breaking down the expression and using documentation to explain what it means // It will help to think about the order in which expressions are evaluated -// Try logging the value of num several times to build an idea of what the program is doing +// Try logging the value of num and running the program several times to build an idea of what the program is doing diff --git a/Sprint-1/interpret/time-format.js b/Sprint-1/interpret/time-format.js index 92ac9752b..83232e43a 100644 --- a/Sprint-1/interpret/time-format.js +++ b/Sprint-1/interpret/time-format.js @@ -6,9 +6,7 @@ const totalMinutes = (movieLength - remainingSeconds) / 60; const remainingMinutes = totalMinutes % 60; const totalHours = (totalMinutes - remainingMinutes) / 60; -const remainingHours = totalHours % 24; - -const result = `${remainingHours}:${remainingMinutes}:${remainingSeconds}`; +const result = `${totalHours}:${remainingMinutes}:${remainingSeconds}`; console.log(result); // For the piece of code above, read the code and then answer the following questions