InstruçÔes

Construir um Inversor de String

Neste laboratĂłrio, vocĂȘ irĂĄ construir um inversor de string simples que inverte os caracteres de uma string fornecida. Por exemplo, "hello" deve se tornar "olleh". Objetivo: Cumprir as user stories abaixo e fazer todos os testes passarem para completar o laboratĂłrio. HistĂłrias de UsuĂĄrio: 1. VocĂȘ deve criar uma função chamada reverseString que recebe uma string como argumento. 2. A função deve retornar a string invertida.

O que fazer:

Testes:

  • VocĂȘ deve ter uma função chamada `reverseString`.
  • `reverseString` deve receber uma string como argumento.
  • `reverseString("hello")` deve retornar uma string.
  • `reverseString("hello")` deve retornar a string `olleh`.
  • `reverseString("Howdy")` deve retornar a string `ydwoH`.
  • `reverseString("Greetings from Earth")` deve retornar a string `htraE morf sgniteerG`.

Preview