Vue JS Part: 4 (data, Object & Method)

Using data as an object:

If you want, you can assign an object as a value in the data. See the following example:

Output:

Output

Using data as a method:

If you want, you can assign a method to the data as a value. See the following example:

Output:

Output