O GoConqr está de visual novo! Conte para nós o que você achou.

Módulo 5 de 9 · Mídia

Reverse Join

Kostas Diakogiannis

Reverse Join

Working with arrays and strings

Strings can also work well with arrays.

If you want to take a string and split every letter into an array in order to work individually with all letters you can do it with the split method as we have seen.

Join method is the exact opposite. Is an ARRAY METHOD actually that unites all the elements of an array into a string. You can parameterize what is going to stand between every array element when the string unification takes place exactly the same way with a split, by adding something between every substring.

example: const fruits = ['Apple', 'Orange', 'Bananas']. If we put fruits.join('-') all elements will be unified in a single string with '-' between them. 

Final result: 'Apple-Orange-Bananas' 

Reverse is another action that can be taken in ARRAY to reverse the order of the elements inside it.  Returns the array in reversed order.

Let's see some case were we can used what we learned.

Instruções

Para avançar no curso, envie uma tentativa deste quiz. Você pode enviá-la depois da última pergunta.

Ir para o módulo escolhido

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?