1 549
const numbers = [1, 2, 3, 4, 5];
const [first, ...rest] = numbers;
rest.push(6);
console.log(numbers);
console.log(rest);
06 jul 2024, 04:32
06 jul 2024, ~04:33
✨ Part Of @OfficialCodingExpert Dive into the world of computer science, programming, and coding challenges. Sharpen your skills, expand your knowledge, and embark on a journey of continuous learning. Stay tuned for daily quizzes!
Mostrar másfunction outer() {
let x = 20;
function inner() {
x++;
let x = 30;
console.log(x);
}
inner();
}
outer();return {
bar: "hello"
};
}
function baz() {
return
{
bar: "hello"
};
}
console.log(foo().bar);
console.log(baz().bar);const person = {
name: "Alice",
age: 25
};
Object.freeze(person);
person.age = 30;
person.city = "New York";
console.log(person.age);
console.log(person.city); console.log(message);
var message = "Hello, World!";
console.log(message);
}
sayHello();