Created
March 30, 2020 16:41
-
-
Save gwmccubbin/e0e26032466d95ba5dd2273d88889852 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pragma solidity ^0.6.0; | |
contract MyContract { | |
// Arrays | |
uint[] public uintArray = [1,2,3]; | |
string[] public stringArray = ['apple', 'banana', 'carrot']; | |
string[] public values; | |
uint[][] public array2D = [ [1,2,3], [4,5,6] ]; | |
function addValue(string memory _value) public { | |
values.push(_value); | |
} | |
function valueCount() public view returns(uint) { | |
return values.length; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The code below works fine.