diff --git a/subjects/skiptheline/README.md b/subjects/skiptheline/README.md new file mode 100644 index 00000000..3d43259a --- /dev/null +++ b/subjects/skiptheline/README.md @@ -0,0 +1,38 @@ +## skip-the-line + +### Instructions + +Write a function that receives a string and a slice of strings. Return a new slice with the given string prepended. + +### Expected function + +```go +func SkipTheLine(s string, slice []string) []string { + // your code here +} +``` + +### Usage + +Here is a possible program to test your function: + +```go +package main + +import "fmt" + +func main() { + fmt.Println(SkipTheLine("Hello", []string{"world"})) + fmt.Println(SkipTheLine("Hello", []string{"","world", "!"})) + fmt.Println(SkipTheLine("Hello", []string{})) +} +``` + +and the output should be: + +```console +$ go run . +[Hello world] +[Hello world !] +[Hello] +``` \ No newline at end of file