let newObj = new Object();
let newObj = {};
let champion = {
name: "veigar";
health: 2103;
}
console.log(champion.name);
console.log(champion.health);
let obj = { name : "veigar", health : 2103};
function champion(name, health) {
return {
name,
health,
}
}
let myChamp = champion("veigar", 2103);
let champion = {
name: "veigar";
health: 2103;
}
for (let key in champion) {
console.log(key)
}
let champion = {
name: "veigar";
health: 2103;
}
let champion2 = champion;
let champion = {
name: "veigar";
health: 2103;
talk: function() {
console.log("I am ${this.name}");
}
}
champion.talk();
let champion(veigar, health = 2103) = {
this.name = name;
this.health = health;
this.talk = function() {
console.log("I am veigar");
}
}
let myVeigar = new champion("veigar");