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

Skip to content

Commit 60ab59a

Browse files
committed
updet on js - Remove the sorting from renderOptionElements function
1 parent 0480604 commit 60ab59a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

homework/index.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,11 @@
9999
});
100100
}
101101

102+
// I think i forgot to delete .sort form this function. it been used already in main:
102103
function renderOptionElements(repos, select) {
103-
repos
104-
.sort((a, b) => a.name.localeCompare(b.name))
105-
.forEach((repo, index) => {
106-
createAndAppend('option', select, { text: repo.name, value: index });
107-
});
104+
repos.forEach((repo, index) => {
105+
createAndAppend('option', select, { text: repo.name, value: index });
106+
});
108107
}
109108

110109
function main(url) {

0 commit comments

Comments
 (0)