added ajax and fetch CORS error example, this code should not work unless you run it in xammp

This commit is contained in:
szabomarton
2024-11-18 13:03:08 +01:00
parent 01b1a717df
commit 0ca86bd7c1
5 changed files with 110 additions and 0 deletions

18
24_11_18/tojson.js Normal file
View File

@@ -0,0 +1,18 @@
class Munkas {
constructor(nev, beosztas, kor, fizetes){
this.nev = nev;
this.beosztas = beosztas;
this.kor = kor;
this.fizetes = fizetes;
}
}
let munkasok = [];
munkasok.push(new Munkas("Jani", "sofőr", 45, 300000));
munkasok.push(new Munkas("Pali", "naplopó", 37, 250000));
munkasok.push(new Munkas("Laci", "vezető", 46, 380000));
munkasok.push(new Munkas("Zsolt", "főnök", 25, 3000000));
munkasok.push(new Munkas("Tihamér", "sofőr", 30, 300000));
console.log(JSON.stringify(munkasok));