coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
const fruits = ["Banana", "Orange", "Apple", "Mango"];
console.log(fruits);
const person = {
name: "Alice",
age: 15,
city:"New York"
};
console.log(person);
const person = {firstName:"John", lastName:"Doe", age:50, eyeColor:"blue"};
const person = {
firstName: "John",
lastName: "Doe",
age: 50,
eyeColor: "blue"
};
const person = {};

// Add Properties
person.firstName = "John";
person.lastName = "Doe";
person.age = 50;
person.eyeColor = "blue";
objectName.propertyName
objectName["propertyName"]
const person = {
firstName: "John",
lastName: "Doe",
age: 50,
eyeColor: "blue"
};

delete person.age;
console.log(person);
const person = {
firstName: "John",
lastName: "Doe",
id: 5566,
fullName: function() {
return this.firstName + " " + this.lastName;
}
};

// `fullName` metodini chaqirish va uning natijasini konsolga chiqarish
console.log(person.fullName());
person.name = function () {
return this.firstName + " " + this.lastName;
};
const person = {
firstName: "John",
lastName: "Doe",
id: 5566,
name: function () {
return this.firstName + " " + this.lastName;
}
};

// `name` metodini chaqirish va natijasini konsolga chiqarish
console.log(person.name());