function getPost(id) {
return new Promise((resolve, reject) => {
fetch(`https://jsonplaceholder.typicode.com/posts/${id}`)
.then(response => response.json())
.then(post => resolve(post))
.catch(err = reject(err))
})
}
getPost(6)