FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

learn variables-01 · commitRahul/codingPractice@9e174e1 · GitHub

Commit 9e174e1

Browse files
committed
learn variables-01
1 parent 1c21107 commit 9e174e1

3 files changed

Lines changed: 19 additions & 0 deletions

File tree

‎go.mod‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module local/codingPractice
2+
3+
go 1.22.2

‎golang/src/hello/hello‎

1.81 MB
Binary file not shown.

‎golang/src/variables_01/main.go‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package main
2+
3+
import "fmt"
4+
5+
func main() {
6+
var age int = 30
7+
name := "Alice"
8+
const country = "India"
9+
10+
fmt.Println("Name:", name)
11+
fmt.Println("Age:", age)
12+
fmt.Println("Country:", country)
13+
14+
var notInitialized string
15+
fmt.Println("Default value of notInitialized:", notInitialized)
16+
}

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL