contract ExampleContract {
function containsAThree(uint256[][] calldata nestedArray) public pure returns (bool) {
for (uint256 i = 0; i < nestedArray.length; i++) {
for (uint256 j = 0; j < nestedArray[0].length; j++) {
if (nestedArray[i][j] == 3) {
return true;
}
}
}
return false;
}
}
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter