« first day (2687 days earlier)      last day (1415 days later) » 

10:14 AM
 
 
3 hours later…
 
3 hours later…
5:13 PM
hey guys, I think I'm facing a scope problem. This is the function I'm trying to use

const divTitle = (title, divId) => {
const printTitle = `<h1>${title}</h1>`
if (title) {
return (document.getElementById(`${divId}`).innerHTML = printTitle)
}
};

divTitle(params['divTitle'], target);

If I run it on console it works, but not on my application. I think since I´m running this function on an async call something is getting lost in the way. Any ideas of what can be wrong?
 
1 message moved from JavaScript
 
 
4 hours later…
9:08 PM
tumbleweed
 

« first day (2687 days earlier)      last day (1415 days later) »