contract ExampleContract { function productOfarray(uint256[] calldata myArray) public pure returns (uint256) { uint256 product = 1; for (uint256 i = 0; i < myArray.length; i++) { product *= myArray[i]; } return product; } }
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