'API Project issues

I have two issues I'm encountering. The First is with the following lines of code and getting a break to work.

    let lineBreak = '\n'
    let c = document.getElementById("containerC")
    let day = data.days
    for(let x = 0; x < 5; x++){
        let p = document.createElement("p") 
        c.append(p)
        p.append(day[x].datetime, lineBreak,   
            day[x].temp * 9 / 5 +32 + " F" + ", ",
            day[x].conditions + ", ",
            day[x].description,
            )       
    }
}

The second is getting multiple Divs to style based on my api's results for the condition. When it selects more than 1 div the page errors and won't load the divs at all.

function weatherBG(data) {
    let currentCondition = data.currentConditions.conditions
    let containers = document.querySelectorAll("container")
    if(currentCondition == currentCondition){
        containers.css(backgroundImage = url('https://media1.giphy.com/media/t7Qb8655Z1VfBGr5XB/giphy.gif?cid=ecf05e471vbipwsodtlvxejxnbteynw6twxn5abw348fi79q&rid=giphy.gif&ct=g'))
    }
}

Any help would be greatly appreciated. I'm far overdue on this and need to get it done.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source