1
0
mirror of https://github.com/MADTeacher/go_basics.git synced 2025-11-29 05:36:55 +02:00
Files
go_basics/part_1/1.13/9.go

15 lines
222 B
Go
Raw Normal View History

package main
import "fmt"
func main() {
str1 := "hello"
fmt.Println(str1) // hello
byteArray := []byte(str1)
fmt.Println(byteArray) // [104 101 108 108 111]
str2 := string(byteArray)
fmt.Println(str2) // hello
}