Answer the question
In order to leave comments, you need to log in
Why does push() on $router work?
Why does this.$router have a push() method when it's not an array?
This code will output to the console the object we are pushing to when we write this.$router.push('/')
mounted() {
console.log('this.$router', this.$router);
},
Answer the question
In order to leave comments, you need to log in
let a = {push(el) {console.log(el)}}
a.push(1)
also works and a
also not an array.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question