커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
3-7 에서 console 에 아무것도 표시가 안되어요.
[왕초보] 코딩이 처음이어도 쉽게 배우는 웹개발 A to Z v0
3주차
북마크
최*잎
댓글
5
추천
0
조회수
17
조회수
17
답변 완료


검사 눌러서 콘솔 보면 나와야하는데.. 아무것도 표시가 안되어요.

뭘 잘못한걸까요? ㅠㅜ



<!doctype html>

<html lang="ko">


<head>

    <meta charset="UTF-8">

    <title>Fetch 시작하기</title>

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>

    <script>

        function hey() {

            let url = 'http://spartacodingclub.shop/sparta_api/seoulair';

            fetch(url).then(res => res.json()).then(data => {

                console.log(['RealtimeCityAir']['row'][0])

            })

        }

    </script>

</head>


<body>

    <button onclick="hey()">fetch 연습!</button>

</body>


</html>




취소
 공유
취소
댓글 0
댓글 알림
나의얼굴