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 Data Structures Creating slices

What's wrong with the test cases? I tried both solutions and the backend crashed in both cases

Feedback:

Oh no! We didn't hear from the challenge service in a timely fashion.

If you continue experiencing problems, please contact support at help@teamtreehouse.com.

Fear not! Your code is safe with us. You will be able to resubmit once you reload the challenge.

I tried this offline and it works

package main

import "fmt"

func NobleGases() []string {
    s := []string{"He", "Ne", "Ar", "Kr", "Xe", "Rn"}
    return s
}

// func NobleGases() []string {
//  return []string{"He", "Ne", "Ar", "Kr", "Xe", "Rn"}
// }

func main() {
    fmt.Println(NobleGases())
}
[Running] go run "/Users/redacted/Desktop/hello.go"

[He Ne Ar Kr Xe Rn]

[Done] exited with code=0 in 0.224 seconds
src/elements/elements.go
package elements

func NobleGases() []string {
    s := []string{"He", "Ne", "Ar", "Kr", "Xe", "Rn"}
    return s
}

// func NobleGases() []string {
//  return []string{"He", "Ne", "Ar", "Kr", "Xe", "Rn"}
// }

1 Answer

Hello

Your solution is correct, I have notified Treehouse support.

It works for me so maybe try again?

package elements

func NobleGases() []string {
  // YOUR CODE HERE
  return []string{"He", "Ne", "Ar", "Kr", "Xe","Rn"}
}

Thanks.