chapter8-code-4
Thu Mar 30 2023 09:58:53 GMT+0000 (Coordinated Universal Time)
Saved by
@RareSkills
contract ExampleContract {
// ACCEPTED: [[1,2],[3,4],[5,6]] -> returns 6
function getLast(uint256[2][3] calldata nestedArray) public pure returns (uint256) {
return nestedArray[2][1];
// nestedArray[2] -> [5,6] then get the 1st index item -> 6
}
}
content_copyCOPY
Comments