46 lines
709 B
JavaScript
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"
|
|
// }
|