
* 겪고 있는 문제 상황을 최대한 자세하게 작성해주세요.
* 문제 해결을 위해 어떤 시도를 해보았는지 구체적으로 함께 알려주세요.
$(document).ready( function(){
fetch("http://spartacodingclub.shop/sparta_api/weather/seoul")
.then(res => res.json())
.then(data =>{
let temp = data["temp"]
$('#minihead').text(temp);
}
)
})
<li><a href="#" class="nav-link px-2 text-white">현재기온: <span id="minihead"> 20.00</span> 도</a></li>
코드를 요렇게 짰고 문제 없이 작동하는데, '20.00 : 도' 요렇게 표현하고 싶어요. 띄워쓰기를 어떻게 넣으면 될까요?
