Blog/JavaScript
[JS30] Ajax Type Ahead (Ajax 타이핑)
Document 🔥Javascript 30 - Day 06🔥이번에는 Javascript30의 Day 06에 해당하는 'Ajax Type Ahead'를 정리해봅니다@@@@ json 내용 가져오기 우선은 json 내용을 가져와 봅시다. const endpoint = "https://gist.githubusercontent.com/Miserlou/c5cd8364bf9b2420bb29/raw/2bf258763cdddd704f8ffd3ea9a3e81d25e2c6f6/cities.json"; const cities = []; fetch(endpoint) .then(blob => blob.json()) .then(data => cities.push(...data)); 이게 뭔 소린가 싶죠..... 하나하나 살펴보면 ..
2019. 2. 6.