Created
August 2, 2022 12:55
-
-
Save developeruche/109b9252f67e2ebbb730bb23d646197b to your computer and use it in GitHub Desktop.
Odd testing
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.7.0 <0.9.0; | |
contract MyContract { | |
uint[] public arr = [1,2,3,4,5,6,7,8,9,10]; | |
uint[] public res; | |
function startWork() public { | |
for (uint i = 0; i < arr.length; i++) { | |
if(arr[i] % 2 == 0) { | |
res.push(arr[i]); | |
} | |
} | |
} | |
function makeReturns() external returns (uint[] memory) { | |
return res; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment