When passing data to my ejs view i cannot manipulate the dom using the data. when trying to use "inline" code nothing happens, and when trying to use script tag i get an error that the data is not defined.
function per(data){
data[1].forEach(el=>{
document.getElementById(el).checked=true
})
}