Kingston_Pendrive/Suli/13.b/Frontend/Javascript/2024. 09. 13/js/script.js
2024-11-19 19:04:02 +01:00

46 lines
709 B
JavaScript

let car = {
name: "Fiat",
model: "500",
engine: {
horsepower: "110",
fuel: "benzin"
},
start: function() {
return "Autó elindult"
},
drive: function() {
return "Autó megy"
},
carInfo: function() {
return `${this.name}, ${this.model}`
}
}
let tombNeve = ["alma", "cseresznye"]
console.log(tombNeve[tombNeve.length - 1]);
tombNeve.forEach(item => {
console.log(item);
})
console.log(new Date().getTime() / (1000));
// let car2 = new Object()
// car2.name = "Fiat"
// car2.model = "500"
// car2.start = function() {
// return "Autó elindult"
// }
// car2.drive = function() {
// return "Autó megy"
// }