Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c463fcd

Browse files
author
Jin Xu
committed
course wesbos#17 finished in an ugly way
1 parent 4fdd3ff commit c463fcd

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

17 - Sort Without Articles/index-START.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,19 @@
5959
obj.band = obj.band.replace(/^the |^an |^a /i, ' ').trim()
6060
})
6161

62-
console.log(cloneBands);
6362
phantom = phantom.sort((a,b) => a > b ? 1 : -1)
64-
console.log(phantom);
6563

6664
cloneBands.map(obj => {
6765
phantom.forEach((item, idx) =>{
6866
if(item === obj.band) result[idx] = obj.src;
6967
})
7068
})
7169

72-
console.clear()
73-
// console.
70+
result.forEach(value => {
71+
var li = document.createElement('li');
72+
li.innerHTML = value;
73+
document.getElementById('bands').appendChild(li);
74+
})
7475

7576
</script>
7677

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
14. [x] ~~JavaScript References vs. Copying~~
2121
15. [x] ~~LocalStorage~~
2222
16. [x] ~~Mouse Move Shadow~~
23-
17. [ ] Sort Without Articles
23+
17. [x] ~~Sort Without Articles~~
2424
18. [ ] Adding Up Times with Reduce
2525
19. [ ] Webcam Fun
2626
20. [ ] Speech Detection

0 commit comments

Comments
 (0)