coding with ☕️
2 subscribers
262 photos
14 videos
11 files
165 links
Anwendungsentwicklung
Download Telegram
PageX - card ni o'lchaydi
OffsetX - card dan tashqarini o'lchaydi
btn.onclick = () => {
root.style.setProperty("--color',gold")
localStorage.setItem('color', 'gold')

}
btn.ondblclick = () => {
root.style.setProperty("--color',green")
localStorage.setItem('color', 'green')

}
})
root.style.setProperty('--color', localStorage.getItem("color"))
function Person (firstName, lastName) {
this.firstName = firstName
this.lastName = lastName
}

const firstPerson = new Person("Fotima", "Nishonova")
const secondPerson = new Person("Zuhra", "Nishonova")

console.log(firstPerson);
console.log(secondPerson);
this.hello = function() {
console.log(`Hello ${this.firstName} ${this.lastName} `); firstPerson.hello()
secondPerson.hello()
function hello() {
console.log("Salom, dunyo!");
}
hello(); // Funksiyani chaqirish
function sayHello(name) {
console.log("Salom, " + name + "!");
}
sayHello("Ali"); // Chaqirish: Salom, Ali!
function sum(a, b) {
return a + b;
}
let result = sum(5, 3); // Chaqirish
console.log(result); // Natija: 8
let greet = function(name) {
return "Salom, " + name + "!";
};
console.log(greet("Hasan")); // Chaqirish
const multiply = (a, b) => a * b;
console.log(multiply(4, 2)); // Chaqirish: 8
(function() {
console.log("Bu funksiya avtomatik chaqiriladi!");
})();
const person = {
name: "Ali",
greet: function() {
console.log("Salom, men " + this.name);
}
};
person.greet(); // Chaqirish: Salom, men Ali