
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>
