I have this simple code:
function restart() public returns (uint256[] ) {
uint256[] memory result = new uint256[](5);
result[0] = 10;
uint256[] memory result1 = new uint256[](5);
result1 = result;
result1[1] = 20;
return result;
}
The result final value is : {10,20}. But I wanted for it to just be {10}. Is there a way to copy an array without being a pointer? I basically just want to create a "local" copy of result. thank you