
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
$(document).ready(function () {
let url = "http://spartacodingclub.shop/sparta_api/weather/seoul";
fetch(url).then(res => res.json()).then(data => {
let temp = data['temp'];
let temp_html = ``;
if (temp > 20) {
temp_html = `${temp}도, 더워요`;
} else {
temp_html = `${temp}도, 추워요`;
}
$('#aaa').text(temp_html);
})
})
3주차 숙제 코드 입니다.
여기서 $, ``의 역할은 무엇인가요 ?
그리고 <span></span>, <li></li>의 역할도 무엇인지 궁금합니다 !
