added Kutya

This commit is contained in:
Digi
2024-12-14 14:50:02 +01:00
parent c913243b67
commit 51551b918c
26 changed files with 16425 additions and 0 deletions

52
fatcsabi.js Normal file
View File

@@ -0,0 +1,52 @@
let url = "https://jsonplaceholder.typicode.com/posts";
async function asd(url) {
try{
let result = await fetch(url);
let jsadatszerkezet = await result.json();
console.log(jsadatszerkezet);
} catch {
console.log("ERROR");
} finally {
console.log("END");
}
}
//asd(url);
async function name(url) {
fetch(url, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: "Szabó Márton",
email: "digivagyok@gmail.com"
}),
})
}
class Szemely{
#nev;
constructor(nev){
this.#nev = nev;
}
get nev(){
return this.#nev;
}
set nev(ujnev){
this.#nev = ujnev;
}
}
let digi = new Szemely("Digi");
digi.nev = "Szabó Márton";
console.log(digi.nev);