커뮤니티
포인트
쿠폰
내 강의실
국비 신청 내역
증명서
계정
로그아웃
학습 질문
개발 일지
나의 활동
답변 완료
2-11 서울따릉이
undefined주차
북마크
양*서
댓글
3
추천
0
조회수
15
조회수
15
답변 완료

ajax.02.html:36 

     

    Uncaught ReferenceError: row is not defined

  at Object.success (ajax.02.html:36:36)

  at c (jquery.min.js:2:27742)

  at Object.fireWith [as resolveWith] (jquery.min.js:2:28487)

  at l (jquery.min.js:2:78789)

  at XMLHttpRequest.<anonymous> (jquery.min.js:2:81117)


콘솔 창에 이렇게 뜨는데요 문제점좀 찾아주세요 ㅜ..


<script>

        function q1() {

            $.ajax({

                type: "GET",

                url: "http://spartacodingclub.shop/sparta_api/seoulbike",

                data: {},

                success: function(response){

                    let rows = response['getStationList']['row']

                    for (let i = 0; i < rows.length; i++) {

                        let name = row[i]['stationName']

                        let rack = row[i]['rackTotCnt']

                        let bike = row[i]['parkingBikeTotCnt']


                        console.log(name,rack,bike)



                         }                  

                    }

                })

            }

    </script>


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