Greetings! I am facing an issue with a JavaScript array declared outside of a function as shown below:
var daily = [];
daily["data"]=[];
daily["data"].push('hello');
function demo()
{
console.log(daily); // not working here
}
Can anyone advise on how to declare this object as global in JavaScript?