diff --git a/fetch.js b/fetch.js index 18af076..40abc5c 100644 --- a/fetch.js +++ b/fetch.js @@ -1,35 +1,9 @@ const url = "http://localhost/p20/get.php" -<<<<<<< HEAD let lista -======= ->>>>>>> dev2 fetch(url) .then(response => response.json()) .then(data => { -<<<<<<< HEAD - // console.log(data) - sortujSufiksy(data) - }) - -function sortujSufiksy(data) { - - data.forEach((element) => { console.log(element) }); - - // 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)); - // } - // document.getElementById('nieposortowane').textContent = formatSufiksy(sufiksy); - // sufiksy.sort(); - // document.getElementById('posortowane').textContent = formatSufiksy(sufiksy); -} - -function formatSufiksy(sufiksy) { - return sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n'); -======= sortujSufiksy(data) }); @@ -49,5 +23,4 @@ function sortujSufiksy(data) { function formatSufiksy(sufiksy) { // console.log(sufiksy.map((sufiks, index) => `${index + 1} ${sufiks}`).join('\n')); ->>>>>>> dev2 } \ No newline at end of file diff --git a/index.html b/index.html index 5209562..9a261cd 100644 --- a/index.html +++ b/index.html @@ -14,15 +14,9 @@