API 요청
·
FrontEnd/JavaScript
fetch apiasync function 함수이름() { const name = document.getElementById('name').value fetch(`http://localhost:3000/sound/${name}`) .then((response) => response.json()) .then((data) => { console.log(data) document.getElementById('name').value = data });}// 최신 문법async function logJSONData() { const response = await fetch("http://example.com/movies.json"); const jsonData = await..