Guest User

Untitled

a guest
May 25th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. pragma solidity ^0.4.0;
  2.  
  3.  
  4. contract test{
  5. uint[] public myArray;
  6.  
  7. function test() public{
  8.  
  9. myArray.push(1);
  10. myArray.push(4);
  11. myArray.push(100);
  12. }
  13.  
  14. function getArrayLength() public view returns (uint){
  15.  
  16. return myArray.length;
  17. }
  18.  
  19. function getFirstElement() public view returns (uint){
  20. return myArray[0];
  21. }
  22.  
  23.  
  24. }
Add Comment
Please, Sign In to add comment