SirPHOBIA
KPCKevin Powell - Community
•Created by SirPHOBIA on 6/26/2023 in #front-end
how to render diff elements at once in vanila js
No worries i'll figure it out
10 replies
KPCKevin Powell - Community
•Created by SirPHOBIA on 6/26/2023 in #front-end
how to render diff elements at once in vanila js
my whole code
10 replies
KPCKevin Powell - Community
•Created by SirPHOBIA on 6/26/2023 in #front-end
how to render diff elements at once in vanila js
let arr=[]
const container = document.getElementById("weather-up");
const getForecast = async(city)=>{
let res = await fetch(
let data = await res.json(); arr.push(data.forecast.forecastday); const toInject = arr.map((el)=>{ const p = document.createElement('p'); p.textContent=
https://api.weatherapi.com/v1/forecast.json?key=cb543f98c304497393a70530232306&q=${city}&days=7&aqi=no&alerts=no
);let data = await res.json(); arr.push(data.forecast.forecastday); const toInject = arr.map((el)=>{ const p = document.createElement('p'); p.textContent=
${el.day.maxtemp_c}
;
return p;
})
container.append(...toInject)
}10 replies
KPCKevin Powell - Community
•Created by SirPHOBIA on 6/26/2023 in #front-end
how to render diff elements at once in vanila js
index.js:48 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'maxtemp_c')
10 replies
KPCKevin Powell - Community
•Created by SirPHOBIA on 6/11/2023 in #front-end
How to fix row height in grid
thanks @vince it worked
4 replies