Im trying to create a chart using charts.js with an array of data I am getting from an ajax call. VisitsPerDay is an array i created and i am pushing the values from the ajax call
visitsPerDay = visitsPerDay.push(Object.values(html.results[0])[0])
Then if i console.log it i get this
When I use these 3 commands
console.log("PerDay", visits)
console.log("PerDay", visits[0])
console.log("PerDay", visits.length)
I should get the array, the first number, and length, right? Instead I'm getting the array,undefined and 0