package main

import "fmt"

type Person struct {
	Name    string `json:"name"`
	Age     int `json:"age"`
}



func main() {
    personList := []Person{
        {Name: "Oliver", Age: 27},
        {Name: "James", Age: 23},
        {Name: "Jack", Age: 17},
        {Name: "John", Age: 27},
        {Name: "Harry", Age: 16},
        {Name: "Robert", Age: 18},
        {Name: "Jacob", Age: 38},
        {Name: "Micheal", Age: 42},
        {Name: "Frank", Age: 19},
    }
    p := maxAge(personList)
    fmt.Println("Il più anziano è", p.Name, "con", p.Age, "anni")
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: