The charCodeAt() method in JavaScript returns the numeric Unicode value of the character at the given index, e.g.
charCodeAt()
\"s\".charCodeAt(0) // returns
Internally string is a 8 bit byte array in golang. So every byte will represent the ascii value.
str:="abc" byteValue := str[0] intValue := int(byteValue) fmt.Println(byteValue)//97 fmt.Println(intValue)//97