clean code
This commit is contained in:
parent
d7505f59d3
commit
3cc3e92d8b
13
fetch.js
13
fetch.js
|
@ -9,19 +9,6 @@ fetch(url)
|
|||
});
|
||||
|
||||
function sortujSufiksy(data) {
|
||||
const slowo = document.getElementById('slowo').value;
|
||||
// console.log("tetst" + slowo)
|
||||
const sufiksy = [];
|
||||
for (let i = 0; i < slowo.length; i++) {
|
||||
sufiksy.push(slowo.slice(i));
|
||||
}
|
||||
|
||||
data.forEach((element) => document.querySelector('#nieposortowane').innerHTML += `<li> ${JSON.stringify(element.osoby)} </li>`);
|
||||
// console.log(formatSufiksy(sufiksy));
|
||||
// sufiksy.sort();
|
||||
// document.querySelector('#posortowane').innerHTML += formatSufiksy(sufiksy);
|
||||
}
|
||||
|
||||
function formatSufiksy(sufiksy) {
|
||||
// console.log(sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n'));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue