const someObject = {
name: 'john',
job: 'developer',
location: 'florida',
};
console.log(someObject.name);
const { name, job } = someObject;
console.log(job);
other ex
const Book = (props) => {
const { img, title, author } = props;
return (
<article className='book'>
<img src={img} alt={title} />
<h2>{title}</h2>
<h4>{author} </h4>
</article>
);
};
const Book = ({ img, title, author }) => {
return (
<article className='book'>
<img src={img} alt={title} />
<h2>{title}</h2>
<h4>{author} </h4>
</article>
);
};
Top comments (0)