0

If I don't specify the function variable as storage or memory, what should be the default keyword?

1
  • It is an error if you don't specify the default visibility.
    – Ismael
    Jun 4 at 2:08

2 Answers 2

0

Variable state defining is important for new versions of solidity. Storage variable stores permanent storage in blockchain and is quite expensive to use. Memory variable is stored temporarily and is cheaper to use.

Reference

0

If you are declaring a variable that is storing a string then it is an error if you do not specify the variable as storage

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.