2

Just a question around dynamic solidity arrays. Is the order always guaranteed? I.e.

string[] public myArray2 = ['value0', 'value1', 'value2', 'value3'];

Will myArray2[1] always contain 'value1' for the lifespan of the contract?

Thanks!

1 Answer 1

2

Yes, myArray2[1] will always contain the value 'value1' for the lifespan of the contract, unless it is explicitly modified by a contract function or by an external account with the appropriate permissions.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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