package main import "fmt" // TODO: define Rectangle struct with Width and Height // TODO: define Area() method on Rectangle func main() { r := Rectangle{Width: 5, Height: 10} fmt.Println(r.Area()) }
Output
Click Run to execute, or Check to validate.
Ask questions or share tips about this tutorial
Sign in to join the discussion