Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Go Language Go Language Overview Flow Control Loops

Not working

I am just struggling trying to grab the arguments for this command! I keep getting VALUE errors..

src/loops/loop.go
package loops

import "fmt"

func CountByThrees(start int, end int) {  
  for i := start; i <= end; i += 3 {
    fmt.Println(i)
}
    fmt.Println.CountByThrees(3, 9)
}

2 Answers

Steven Parker
Steven Parker
229,657 Points

You only need to define the function, you won't need to call it (the validator does that).

Cheese and rice!!! I feel like a dumb dumb now!! Lol

Thank you, it worked.

Steven Parker
Steven Parker
229,657 Points

Glad to help.

And you taught me something new — I wasn't familiar with the expression "cheese and rice" before (but I looked it up)! :laughing: