const getPosts = async () => {
try {
const res = await fetch('http://jsonplaceholder.typicode.com/posts')
const data = await res.json()
console.log(data, 'array')
} catch (error) {
console.log(error)
}
}
getPosts ()
await res.json()
const input = document.querySelector('input')
let value = ''
input.addEventListener('change', () => {
value = input.value
})