Share:
Notifications
Clear all

Earn While Learning Web3 Programming>> Start Here FREE!!!

[Solved] Solidity Functions By State Variable Access

1 Posts
1 Users
2 Reactions
495 Views
1
Topic starter

EXERCISE:

i. What Is Pure Function In Solidity?

ii. What Is View/Getter Function In Solidity?

iii. What Is Setter Function In Solidity?

v. Write a Smart Contract following the course video on your own using Pure, View and Setter function to change the Age and FullName of State and Local Variables and post the code below above three answers in this forum:

 

NOTE:

This Is An Exercise From Our FREE Smart Contract Development With Solidity For Beginners Course (If you have not enrolled yet, you can join the course totally for FREE).

 

1 Answer
1
Topic starter

Functions In Solidity By State Variable Access are:

1. Pure

(No interaction outside itself to change state variable or other function states -can interact with local variables)

 

2. View

(Getter) Function (Interact outside itself and can view state variable but not change it)

 

3. Setter Function

(Interact with state variables and can change it, add, remove, delete etc.)

Share: