Why does the push of an array in data result in the length of the array instead of the array?

I have a data ( add_all_available_area ) as follows:

export default {
    data(){
      return {
        ...
        add_all_available_area: []
      }

when I was at fetch_data,

console.log(this.add_all_available_area.push({name:"joe"}))

Why is the result 1 ?

instead of:

[{name:"joe"}]   



    
      
Feb.28,2021

push returns the length of the new array
Array


the return value is the length.


clipboard.png
push returns the length


this.add_all_available_area.push({name:"joe"})
console.log(this.add_all_available_area)
Menu