Skip to content

Commit

Permalink
print the const value in one line
Browse files Browse the repository at this point in the history
  • Loading branch information
Tej-Singh-Rana authored Feb 1, 2022
1 parent f72bbe7 commit 11b191f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions beginner-level/constants/constants-six.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
)

func main() {
// Main code block
// Declare and initialize constant var "i" and "y" in a single line
const i, y = 4, "word"
fmt.Println(i, y)
Expand All @@ -13,3 +14,9 @@ func main() {
// i = 12
// fmt.Println(i)
}

/*
_Output_:-
4 word
*/

0 comments on commit 11b191f

Please sign in to comment.