every browser have window
object inbuilt which can be access from everywhere in client side java script
https://developer.mozilla.org/en-US/docs/Web/API/Window
so if you use
window.App = new Vue({
el: '#app',
components: { question }
});
then your assign a variable App
to window
object so you can use App
to get vue instance in anywhere in your application
and if you use
const app = new Vue({
el: '#app',
components: { question }
});
this then you cannot access app
variable anywhere in you application
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…