If you create an vue app, you’ll need a vue instance. A vue instance contains the apps variables and methods.
If you know object orientated programming: it’s an object that contains the app.
We create the file app.js with this contents:
We defined the scope of our application using ‘el‘. This is simply the content of the div in index.html.
‘data’ holds all the variables for our app. In this example we have only one variable, message.
Load it in your browser, you’ll see the value of message.
The variable message (and Vue variables) are only accessible within the div with id “app”. Outside of the div they are not accessible.