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

 

Leave a Reply

Your email address will not be published. Required fields are marked *