From e2c94ceeb18a907212af5dc35e7fa10f823137b3 Mon Sep 17 00:00:00 2001 From: pawel Date: Fri, 17 May 2024 10:26:17 +0200 Subject: [PATCH] poprawione --- get.php | 5 +++-- js.js | 32 ++++++++++++++++---------------- 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/get.php b/get.php index e33c2a4..6f983d5 100644 --- a/get.php +++ b/get.php @@ -1,13 +1,14 @@ - response.json()) .then( data => { console.log(data) }) - -function sortujSufiksy() { - const slowo = document.getElementById('slowo').value; - 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'); -} + +// function sortujSufiksy() { +// const slowo = document.getElementById('slowo').value; +// 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'); +// }