Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions Sprint-1/1-key-exercises/2-initials.js
Original file line number Diff line number Diff line change
@@ -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

7 changes: 2 additions & 5 deletions Sprint-1/4-stretch-explore/chrome.md
Original file line number Diff line number Diff line change
@@ -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?

Expand Down
8 changes: 4 additions & 4 deletions Sprint-2/3-mandatory-implement/1-bmi.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
// return the BMI of someone based off their weight and height
}
2 changes: 1 addition & 1 deletion Sprint-2/3-mandatory-implement/3-to-pounds.js
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Sprint-2/4-mandatory-interpret/time-format.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Sprint-3/4-stretch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
5 changes: 2 additions & 3 deletions Sprint-3/4-stretch/password-validator.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
function passwordValidator(password) {
return password.length < 5 ? false : true
return password.length >= 5;
}


module.exports = passwordValidator;
module.exports = passwordValidator;