Compare commits
No commits in common. "c225a7d1979ea4720a301e61655a07042a566984" and "d08593c4133a1284d3b2fee3a4f0aa6779bb7b3e" have entirely different histories.
c225a7d197
...
d08593c413
18
fetch.js
18
fetch.js
|
@ -1,21 +1,7 @@
|
||||||
const url = "http://localhost/P20.05/get.php"
|
const url = "http://localhost/15.05/get.php"
|
||||||
|
|
||||||
fetch(url)
|
fetch( url + 'get.php')
|
||||||
.then(response => response.json())
|
.then(response => response.json())
|
||||||
.then( data => {
|
.then( data => {
|
||||||
console.log(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');
|
|
||||||
}
|
|
Loading…
Reference in New Issue