2024-09-06 07:26:35 +00:00
|
|
|
let x;
|
|
|
|
|
|
|
|
if (true){
|
|
|
|
x = 25;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (true){
|
|
|
|
y = 10;
|
2024-09-06 06:08:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
console.log(x);
|
2024-09-06 07:26:35 +00:00
|
|
|
console.log(y);
|
2024-09-06 06:08:42 +00:00
|
|
|
|
2024-09-06 07:26:35 +00:00
|
|
|
const z = 25;
|
|
|
|
if (true){
|
|
|
|
console.log("Blokkon belül: " + z);
|
2024-09-06 06:08:42 +00:00
|
|
|
}
|
|
|
|
|
2024-09-06 07:26:35 +00:00
|
|
|
console.log("Blokkon kívül: " + z);
|
|
|
|
|
|
|
|
|
|
|
|
if (true){
|
|
|
|
const a = 89;
|
|
|
|
}
|
|
|
|
|
|
|
|
//console.log(a);
|
|
|
|
|
|
|
|
|
|
|
|
function Person(name, age){
|
|
|
|
this.name = name;
|
|
|
|
this.age = age;
|
|
|
|
}
|
|
|
|
|
|
|
|
let person1 = new Person("janos", 19);
|
|
|
|
|
|
|
|
console.log(person1.name);
|
|
|
|
console.log(person1.age);
|
|
|
|
|
|
|
|
let jatek = {
|
|
|
|
nev: "Minecraft",
|
|
|
|
fejleszto: "Mojang",
|
|
|
|
megjelenés: 2009
|
|
|
|
};
|
|
|
|
|
|
|
|
console.log(jatek.nev);
|
|
|
|
|
|
|
|
let nums = [1,3,4,6,9];
|
|
|
|
console.log(nums);
|
|
|
|
|
|
|
|
let userMap = new Map();
|
|
|
|
userMap.set('name', 'Kristóf');
|
|
|
|
console.log(userMap);
|
|
|
|
|
|
|
|
let numset = new Set([1,2,3,4,5]);
|
|
|
|
console.log(numset);
|