What's wrong with this code?

(Cherolyn Lexvold) #21

Thank you guys. I think I’m going to leave this one and go on from here. I’m determined to succeed

(Cherolyn Lexvold) #22

This is difficult for me

(Ignacio Gómez) #23

Maybe reading about scopes first could help a bit: https://en.wikipedia.org/wiki/Scope_(computer_science).

(Cherolyn Lexvold) #24


(Cherolyn Lexvold) #25

This was definitely helpful.

(Cherolyn Lexvold) #26

I also bookmarked it.

(Anyaddres) #27

This maybe something you want to do…https://play.golang.org/p/PigVlVGoycT. In your example you had a typo after the 2. That was the first error. You cant have ; in Go just after the comparison…Second issue was you were trying to compare apples to bananas…x is a variable but its an integer type and not a boolean. Remember that Go is statically typed.

(Cherolyn Lexvold) #28

Interesting and cool.