From 6eeff20876bbfc4f034d7f3d413ebbb61ce381af Mon Sep 17 00:00:00 2001 From: Tiago Collot Date: Wed, 24 Aug 2022 16:27:13 +0100 Subject: [PATCH] feat: add README.md of new go exercise jumpover --- subjects/jumpover/README.md | 43 +++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 subjects/jumpover/README.md diff --git a/subjects/jumpover/README.md b/subjects/jumpover/README.md new file mode 100644 index 00000000..80f8c95f --- /dev/null +++ b/subjects/jumpover/README.md @@ -0,0 +1,43 @@ +# jumpover + +### Instructions + +Write a function `jumpover` that takes a string and returns another string with every third character. + +- Prints the output followed by newline `\n`. +- If the string is empty, return newline `\n`. +- If there is no third character, return newline `\n`. + +### Expected function + +```go +func JumpOver(str string) string { +} +``` + +### Usage + +Here is a possible program to test your function : + +```go +package main + +import "fmt" + +func main() { + fmt.Print(JumpOver("1010101010")) + fmt.Print(JumpOver("")) + fmt.Print(JumpOver("t w e l v e")) + fmt.Print(JumpOver("12")) +} +``` + +And its output : + +```go +$ go run . | cat -e +101$ +$ +w v$ +$ +```