// SPDX-License-Identifier: MIT
// 数组可以在声明时指定长度,也可以动态调整大小
string[2] public fruit = ["apple", "mango"];
uint[2] public numbers = [1, 2];
string[] public list = ["a", "b", "c"];
function add(string memory name) public{
Person public rita = Person("rita", 3);
Person[] public listOfPeople;
// Mapping也就是映射,可以理解为Javascribt中的Object
mapping (string name => int256 age) public nameToAge;
// 也可以写成 mapping (string => int256 ) public nameToAge;
function setAge(string memory _name, int256 _age) public {
function getAge(string memory _name) public view returns(int256) {