so i dont understand the logic behind "is" keyword (here "isSleeping") i see lots of time studying javascript.
does it mean something results boolean?
let animal = {
walk() {
if (!this.isSleeping) {
alert(`I walk`);
}
},
sleep() {
this.isSleeping = true;
}
};
let rabbit = {
name: "White Rabbit",
__proto__: animal
};
// modifies rabbit.isSleeping
rabbit.sleep();
alert(rabbit.isSleeping);
alert(animal.isSleeping);