Returning a string

In this code,,
is “s” related to “s1” and if so, how?; and is there something in the code that clues you in to that?

No. The function foo returns a string which main prints. You can get rid of s and s1 without altering the program:

package main

import (

func main() {

func foo() string {
	return "Hello world"

Thanks!!! I love it when I understand something!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.