Array push method for Chart js
Array Push Chart.js Code
By using the array push method you add another value into your array. The push method will add a new value to the very end of the array. Which is than considered the last value within the array. See code sample below for basic understanding.
const colors = ['red', 'blue', 'green'];
colors.push('yellow') // colors = ['red', 'blue', 'green'];
The four basic array methods
If you start developing with Chart.js there are four specific array methods you should begin with. There are many more that are much more powerful but tend to be more complicated. So having a foundation before explore more advance array methods.
Once you understand the basics you can continue on with the ore advance which gives you much more options such as the array method as array indexOf, array slice, and more which are more deeper into the Array Series. Or combining any of these together.