Skip to content

Commit 9070181

Browse files
small marking guide fixes
1 parent 5c53f69 commit 9070181

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

javascript/introduction-to-js-1/tasks/strings/marking.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Our final string task looks at your ability to use template literals. Your answe
7272

7373
* The `theorem` string.
7474
* The value of `a`.
75-
* The value of `b`.
75+
* The value of `b`.
7676
* The length of the hypotenuse, if `a` and `b` are the lengths of the two shortest sides of a right-angled triangle. You can use pythagoras' theorem to work this out.
7777

7878
Your code should look something like this:
@@ -83,7 +83,7 @@ let theorem = 'Pythagorean theorem';
8383
let a = 5;
8484
let b = 8;
8585
86-
let myString = `Using ${ theorem }, we can work out that that if the two shortest sides of a right-angled triangle have lengths of ${ a } and ${ b }, the length of the hypotenuse is ${ Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2)) }.`;
86+
let myString = `Using ${ theorem }, we can work out that that if the two shortest sides of a right-angled triangle have lengths of ${ a } and ${ b }, the length of the hypotenuse is ${ Math.sqrt((a**2) + (b**2)) }.`;
8787
```
8888

89-
You could also a simpler form of the fourth placeholder, something like `${ Math.sqrt((a * a) + (b * b)) }`.
89+
You could use a different form of the fourth placeholder, such as `Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2))` or `${ Math.sqrt((a * a) + (b * b)) }`.

javascript/oojs/tasks/json/marking.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Note: If there is an error in your code, it will be outputted into the results p
66

77
## Task 1
88

9-
The one and only task in this article concerns accessing JSON data and using it in your page. JSON data about some mother cats and their kittens is available at [sample.json](sample.json). The JSON is loaded into the page as a text string and made available in the `catString` parameter of the `displayCatInfo()` function, called when the provided promise chain (which starts by fetching the JSON data) is fulfilled. Your task is to fill in the missing parts of the `displayCatInfo()` function to output:
9+
The one and only task in this article concerns accessing JSON data and using it in your page. JSON data about some mother cats and their kittens is available in [sample.json](sample.json). The JSON is loaded into the page as a text string and made available in the `catString` parameter of the `displayCatInfo()` function, called when the provided promise chain (which starts by fetching the JSON data) is fulfilled. Your task is to fill in the missing parts of the `displayCatInfo()` function to store:
1010

1111
* The names of the three mother cats, separated by commas, in the `motherInfo` variable.
1212
* The total number of kittens, and how many are male and female, in the `kittenInfo` variable.

0 commit comments

Comments
 (0)