diff --git a/Sprint-1/1-key-exercises/2-initials.js b/Sprint-1/1-key-exercises/2-initials.js index 47561f6175..964c9563c6 100644 --- a/Sprint-1/1-key-exercises/2-initials.js +++ b/Sprint-1/1-key-exercises/2-initials.js @@ -1,11 +1,10 @@ -let firstName = "Creola"; -let middleName = "Katherine"; -let lastName = "Johnson"; +const firstName = "Creola"; +const middleName = "Katherine"; +const lastName = "Johnson"; // 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. -let initials = ``; +const initials = ``; // https://www.google.com/search?q=get+first+character+of+string+mdn - diff --git a/Sprint-1/4-stretch-explore/chrome.md b/Sprint-1/4-stretch-explore/chrome.md index e7dd5feafe..962580b828 100644 --- a/Sprint-1/4-stretch-explore/chrome.md +++ b/Sprint-1/4-stretch-explore/chrome.md @@ -1,14 +1,11 @@ -Open a new window in Chrome, - -then locate the **Console** tab. +Open a new window in Chrome, right click an empty space on the page, select **Inspect** from the dropdown, then locate the **Console** tab. Voila! You now have access to the [Chrome V8 Engine](https://www.cloudflare.com/en-gb/learning/serverless/glossary/what-is-chrome-v8/). Just like the Node REPL, you can input JavaScript code into the Console tab and the V8 engine will execute it. Let's try an example. -In the Chrome console, -invoke the function `alert` with an input string of `"Hello world!"`; +In the Chrome console, invoke the function `alert` with one argument, the string `"Hello world!"`; What effect does calling the `alert` function have? diff --git a/Sprint-2/3-mandatory-implement/1-bmi.js b/Sprint-2/3-mandatory-implement/1-bmi.js index 17b1cbde1b..58b1085f1f 100644 --- a/Sprint-2/3-mandatory-implement/1-bmi.js +++ b/Sprint-2/3-mandatory-implement/1-bmi.js @@ -6,14 +6,14 @@ // squaring your height: 1.73 x 1.73 = 2.99 // dividing 70 by 2.99 = 23.41 -// Your result will be displayed to 1 decimal place, for example 23.4. +// Your result will be displayed to 1 decimal place, for example '23.4'. // You will need to implement a function that calculates the BMI of someone based off their weight and height // Given someone's weight in kg and height in metres // Then when we call this function with the weight and height -// It should return their Body Mass Index to 1 decimal place +// It should return a string of their Body Mass Index to 1 decimal place function calculateBMI(weight, height) { - // return the BMI of someone based off their weight and height -} \ No newline at end of file + // return the BMI of someone based off their weight and height +} diff --git a/Sprint-2/3-mandatory-implement/3-to-pounds.js b/Sprint-2/3-mandatory-implement/3-to-pounds.js index 6265a1a703..10754da73f 100644 --- a/Sprint-2/3-mandatory-implement/3-to-pounds.js +++ b/Sprint-2/3-mandatory-implement/3-to-pounds.js @@ -1,4 +1,4 @@ -// In Sprint-1, there is a program written in interpret/to-pounds.js +// In Sprint-1, there is a program written in 3-mandatory-interpret/3-to-pounds.js // You will need to take this code and turn it into a reusable block of code. // You will need to declare a function called toPounds with an appropriately named parameter. diff --git a/Sprint-2/4-mandatory-interpret/time-format.js b/Sprint-2/4-mandatory-interpret/time-format.js index 17127bc01e..c0dd9c9a5b 100644 --- a/Sprint-2/4-mandatory-interpret/time-format.js +++ b/Sprint-2/4-mandatory-interpret/time-format.js @@ -28,7 +28,7 @@ function formatTimeDisplay(seconds) { // b) What is the value assigned to num when pad is called for the first time? // =============> write your answer here -// c) What is the return value of pad is called for the first time? +// c) What is the return value of pad when it is called for the first time? // =============> write your answer here // d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer diff --git a/Sprint-3/4-stretch/README.md b/Sprint-3/4-stretch/README.md index 8f01227bf9..26545d4af5 100644 --- a/Sprint-3/4-stretch/README.md +++ b/Sprint-3/4-stretch/README.md @@ -4,6 +4,6 @@ These stretch activities are not mandatory, but we hope you will explore them af In this exercise, you'll need to **play computer** with the function `find`. This function makes use of while loop statement. Your task will be to step through the code to figure out what is happening when the computer executes the code. -Next, try implementing the functions specified in `password-validator.js`. +Next, try implementing the function in `password-validator.js` (description of its expected behaviour is in the accompanying `password-validator.test.js` file). Finally, set up your own script and test files for `card-validator.md` diff --git a/Sprint-3/4-stretch/password-validator.js b/Sprint-3/4-stretch/password-validator.js index b55d527dba..040769beaf 100644 --- a/Sprint-3/4-stretch/password-validator.js +++ b/Sprint-3/4-stretch/password-validator.js @@ -1,6 +1,5 @@ function passwordValidator(password) { - return password.length < 5 ? false : true + return password.length >= 5; } - -module.exports = passwordValidator; \ No newline at end of file +module.exports = passwordValidator;