Public
Edited
Sep 22, 2023
Insert cell
Insert cell
{
function display() {
console.log(arguments)
}

display(10, 20)
}
Insert cell
{
function display() {
const arg = [...arguments]
arg.forEach((item, idx) => {
console.log(item, idx)
})
}

display(10, 20)
}
Insert cell
{
const display = () => {
console.log(arguments)
}

display(10, 20)
}
Insert cell
{
const obj = {
name: 'john',
age: 42,
sex: 0,
};

console.log(Object.getOwnPropertyDescriptors(Object.getPrototypeOf(Object.create(obj))));
}
Insert cell
{
const obj = {
name: 'john',
age: 42,
sex: 0,
};

function diswritable(obj, prop) {
Object.defineProperty(obj, prop, {
writable: false,
})
}

diswritable(obj, "age")
obj.age = 24

return obj
}
Insert cell
{
const obj = {
name: 'john',
age: 42,
sex: 0,
};

function disenumerable(obj, prop) {
Object.defineProperty(obj, prop, {
enumerable: false,
})
}

disenumerable(obj, "age")
return obj
}
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more