Skip to content

Commit a21be97

Browse files
authored
Fix typos
1 parent 36b9fdc commit a21be97

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

README.md

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
JavaScript Logging Lab
2-
---
1+
# JavaScript Logging Lab
32

43
## Objectives
54

@@ -24,7 +23,7 @@ On Learn, we use tests as teaching tools. Just like in a normal coding environme
2423

2524
The structure of this lab — where its files and folders are located — looks roughly like the following:
2625

27-
``` shell
26+
```
2827
├── CONTRIBUTING.md
2928
├── LICENSE.md
3029
├── README.md
@@ -59,7 +58,7 @@ Now open up `test/index-test.js`. Hey, there's something! What's all of this stu
5958

6059
At the very top of the file, you'll see
6160

62-
``` javascript
61+
```js
6362
const expect = require('expect')
6463
const fs = require('fs')
6564
const jsdom = require('jsdom')
@@ -70,9 +69,8 @@ This might be a bit bewildering, but at this point, we don't need to be able to
7069

7170
In these first lines, all we're doing is referencing different _libraries_ that help us run your tests. A library is code that someone else (usually multiple someone elses) wrote for our use. Note that `require` won't work out of the box in the browser. We're actually running our tests in a different _environment_. (Remember the sandbox analogy from earlier? It's just like that.)
7271

73-
A little farther down the page, you'll see
74-
75-
``` javascript
72+
A little farther down the page, you'll see:
73+
```js
7674
describe('index', () => {
7775
// there's stuff in here, too
7876
})
@@ -82,7 +80,7 @@ describe('index', () => {
8280

8381
Then we have a few chunks like
8482

85-
``` javascript
83+
```js
8684
it('calls console.error()', () => {
8785
// this is where the tests are!
8886
})
@@ -96,7 +94,7 @@ And that'll be great! These aren't like tests that we all took in school: they'r
9694

9795
In some of our tests, you'll see lines like the following:
9896

99-
``` javascript
97+
```js
10098
jsdom({
10199
src: fs.readFileSync(path.resolve(__dirname, '..', 'index.js'), 'utf-8')
102100
})
@@ -116,15 +114,15 @@ Let's take the first one. The test description says, "index calls console.error(
116114

117115
In `index.js`, add a call to `console.error()` — you can call it with anything you like (as long as the syntax is valid). We're going to go with
118116

119-
``` javascript
117+
```js
120118
console.error("HALP!")
121119
```
122120

123121
Because it seems sufficiently dire. Remember to save your file.
124122

125123
Anyway, let's run the tests again. In the Learn IDE's terminal, run
126124

127-
``` javascript
125+
```js
128126
learn test
129127
```
130128

@@ -171,21 +169,19 @@ next lesson.
171169
In the above, when we ran our tests and saw the message "index calls
172170
console.error()", we wrote,
173171

174-
```javascript
172+
```js
175173
console.error("HALP!")
176174
```
177175

178176
Now when we run the tests again and see "index calls console.log()", we should
179177
look at what is the same and what is different between this message and the
180178
previous one. It looks like they're basically the same except for one tells
181179
us to call `console.error()` and the other tells us to call `console.log()`.
182-
So if we got back to `index.js` and write something like,
183-
184-
```javascript
180+
So if we go back to `index.js` and write something like...
181+
```js
185182
console.log("I would be a logger.") // get it?
186183
```
187-
188-
we're now calling `console.log()` with a different string. Similarly, when we
184+
...we're now calling `console.log()` with a different string. Similarly, when we
189185
see the message "index calls console.warn()", we know that we can go back to our
190186
code and write something with `console.warn()`. You've got this!
191187

0 commit comments

Comments
 (0)