what is the difference between set and get?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By lalel345

what is the difference between set and get?, I read in the documentation but I don’t know when to use which, are used for the same?

:bust_in_silhouette: Reply From: johnygames

You use get to read a value and set to define it. For example, say you have a speed variabIe. If you want to know what value it holds, you will use the get method. Now if you want to change it, you will use the set method.