This commit is contained in:
wagslane
2023-05-01 15:25:27 -06:00
parent f8912668b8
commit 9be3074de6
868 changed files with 58698 additions and 2 deletions

View File

@@ -0,0 +1,9 @@
package main
import "fmt"
func main() {
// declare here
fmt.Println(averageOpenRate, displayMessage)
}

View File

@@ -0,0 +1,9 @@
package main
import "fmt"
func main() {
// declare here
averageOpenRate, displayMessage := .23, "is the average open rate of your messages"
fmt.Println(averageOpenRate, displayMessage)
}

View File

@@ -0,0 +1 @@
0.23 is the average open rate of your messages

View File

@@ -0,0 +1,17 @@
# Same Line Declarations
We are able to declare multiple variables on the same line:
```go
mileage, company := 80276, "Tesla"
// is the same as
mileage := 80276
company := "Tesla"
```
## Assignment
Within the main function, declare a float called `averageOpenRate` and string called `displayMessage` on the same line.
Initialize them to values of `.23` and `is the average open rate of your messages` respectively before they are printed.