# JavaScript's Prototypal Inheritance
Prototypal inheritance is a feature in JavaScript that allows objects to inherit properties and methods from other objects. Here’s an example:
const parent = { greet() { console.log('Hello from parent!'); }};
const child = Object.create(parent);child.greet(); // Hello from parent!
Prototypal inheritance is a flexible way to share behavior between objects without using classes.
node -e "const parent = { greet() { console.log('Hello from parent!'); } }; const child = Object.create(parent); child.greet();"