data()
function returns an object which describes the initial state of the window. Its properties become the properties of the Vue instance. All data properties are reactive, which means that the user interface is automatically updated when the values of these properties are changed.methods
option defines functions which become the methods of the Vue instance. These methods can access and change data properties and call other methods of that instance using the this
keyword. You can use methods to react to user input and implement the logic of the application.