Skip to content

Commit 1c7e405

Browse files
committed
Update DOM - Show anchors.js
1 parent 45127d6 commit 1c7e405

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

javascripts/DOM - Show anchors.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
"use strict";
2-
var i, anchor, name;
2+
var i, anchor, id;
33
var anchors = document.getElementsByTagName("a");
44
for (i = 0; i < anchors.length; i += 1) {
55
anchor = anchors[i];
66
id = anchor.id;
77
if (id !== undefined && id.length > 0) {
8-
anchor.appendChild(document.createTextNode("#" + id));
8+
anchor.appendChild(document.createTextNode(" #" + id));
99
}
1010
}

0 commit comments

Comments
 (0)