Skip to content

Commit

Permalink
fix: remove OL for code fences (mdn#20324)
Browse files Browse the repository at this point in the history
  • Loading branch information
nschonni authored Sep 5, 2022
1 parent e84c15e commit 8df6405
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,35 +183,35 @@ This will give you a window like the following:

To see what happens, try entering the following snippets of code into the console one by one (and then pressing Enter):

1. ```js
alert('hello!');
```
```js
alert('hello!');
```

2. ```js
document.querySelector('html').style.backgroundColor = 'purple';
```
```js
document.querySelector('html').style.backgroundColor = 'purple';
```

3. ```js
const myWordmark = document.createElement('img');
myWordmark.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png');
document.querySelector('h1').appendChild(myWordmark);
```
```js
const myWordmark = document.createElement('img');
myWordmark.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png');
document.querySelector('h1').appendChild(myWordmark);
```

Now try entering the following incorrect versions of the code and see what you get.

1. ```js example-bad
alert('hello!);
```
```js example-bad
alert('hello!);
```
2. ```js example-bad
document.cheeseSelector('html').style.backgroundColor = 'purple';
```
```js example-bad
document.cheeseSelector('html').style.backgroundColor = 'purple';
```
3. ```js example-bad
const myWordmark = document.createElement('img');
myBanana.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png');
document.querySelector('h1').appendChild(myWordmark);
```
```js example-bad
const myWordmark = document.createElement('img');
myBanana.setAttribute('src','https://blog.mozilla.org/press/wp-content/themes/OneMozilla/img/mozilla-wordmark.png');
document.querySelector('h1').appendChild(myWordmark);
```
You'll start to see the kind of errors that the browser returns. Often these errors are fairly cryptic, but it should be pretty simple to figure these problems out!
Expand Down

0 comments on commit 8df6405

Please sign in to comment.