We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e1e7e6 commit b17b932Copy full SHA for b17b932
06 - Type Ahead/index-START.html
@@ -14,9 +14,14 @@
14
<li>or a state</li>
15
</ul>
16
</form>
17
-<script>
18
-const endpoint = 'https://gist.githubusercontent.com/Miserlou/c5cd8364bf9b2420bb29/raw/2bf258763cdddd704f8ffd3ea9a3e81d25e2c6f6/cities.json';
19
20
-</script>
+ <script>
+ const endpoint = 'https://gist.githubusercontent.com/Miserlou/c5cd8364bf9b2420bb29/raw/2bf258763cdddd704f8ffd3ea9a3e81d25e2c6f6/cities.json';
+ let cities = []
21
+ fetch(endpoint)
22
+ .then(response => response.json())
23
+ .then(json => cities = json)
24
+ .then(_ => console.log(cities))
25
+ </script>
26
</body>
27
</html>
0 commit comments