MD typo in <!--BODY-->

When displayed on https://javascript.info/basic-dom-node-properties there was a typo that said <!–BODY–> but it was supposed to say <!--BODY-->. It was caused by a markdown technicality.
This commit is contained in:
davidbludlow 2018-06-22 01:50:04 -05:00 committed by GitHub
parent e40b8e7f72
commit 844aef693e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,6 +12,6 @@ The answer: **`BODY`**.
What's going on step by step:
1. The content of `<body>` is replaced with the comment. The comment is <code>&lt;!--BODY--&gt;</code>, because `body.tagName == "BODY"`. As we remember, `tagName` is always uppercase in HTML.
1. The content of `<body>` is replaced with the comment. The comment is `<!--BODY-->`, because `body.tagName == "BODY"`. As we remember, `tagName` is always uppercase in HTML.
2. The comment is now the only child node, so we get it in `body.firstChild`.
3. The `data` property of the comment is its contents (inside `<!--...-->`): `"BODY"`.