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 trialNomzamo Sithole
61,838 PointsUpdate the CountByThrees function so that it counts from start up to end, skipping 3 each time.
What am i missing here because i keep getting an error messsage : Bummer! We ran some tests on your code's output, but it didn't match what was expected. Click the Preview button to see the test output
package loops
import "fmt"
func CountByThrees(start int, end int) {
// YOUR CODE HERE
for i := 3; i <= 9; i += 3 {
fmt.Println(i)
}
}
1 Answer
Steven Parker
231,275 PointsYou need to use the passed-in parameters
The loop currently always starts at 3 and ends at 9, but instead it should make use of the start
and end
parameters passed in to the function.
Nomzamo Sithole
61,838 PointsNomzamo Sithole
61,838 PointsThank You Steve, i honestly didnt see it that way. Thank you again