Contract
pragma solidity >=0.6.0 <0.7.0;
contract UserStorage {
uint private age;
string public firstName;
string public lastName;
constructor() public {
age = 20;
}
function getDate() public view returns (unit) {
return age
}
function getFullName() public view returns (string memory) {
string memory fullName = string(abi.encodePacked(firstName, " ", lastName))
return fullName
}
function setFirstName(string memory newFirstName) public {
firstName = newFirstName;
}
function setFirstName(string memory newLastName) public {
lastName = newLastName;
}
}Last updated