added ajax and fetch CORS error example, this code should not work unless you run it in xammp
This commit is contained in:
18
24_11_18/tojson.js
Normal file
18
24_11_18/tojson.js
Normal 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));
|
||||
Reference in New Issue
Block a user