pragma solidity ^0.4.18; // Creating a contract contract Types { // Declaring a dynamic array uint[] data; // Function to demonstrate 'For loop' function loop() public returns (uint[] memory) { for (uint i = 0; i < 5; i++) { data.push(i); } return data; } }
0.4.18