title: Combine an Array into a String Using the join Method
challengeType: 1
videoUrl: ''
localeTitle: Combine uma matriz em uma seqüência de caracteres usando o método de associação
---
## Description
<sectionid="description"> O método de <code>join</code> é usado para unir os elementos de uma matriz para criar uma string. É necessário um argumento para o delimitador usado para separar os elementos da matriz na cadeia. Aqui está um exemplo: <blockquote> var arr = ["Olá", "Mundo"]; <br> var str = arr.join (""); <br> // Define str como "Hello World"</blockquote></section>
## Instructions
<sectionid="instructions"> Use o método <code>join</code> (entre outros) dentro da função <code>sentensify</code> para fazer uma sentença a partir das palavras na string <code>str</code> . A função deve retornar uma string. Por exemplo, "Eu-como-Star-Wars" seria convertido para "Eu gosto de Star Wars". Para este desafio, não use o método <code>replace</code> . </section>
## Tests
<sectionid='tests'>
```yml
tests:
- text: Seu código deve usar o método de <code>join</code> .
testString: 'assert(code.match(/\.join/g), "Your code should use the <code>join</code> method.");'
- text: Seu código não deve usar o método <code>replace</code> .
testString: 'assert(!code.match(/\.replace/g), "Your code should not use the <code>replace</code> method.");'
- text: <code>sentensify("May-the-force-be-with-you")</code> deve retornar uma string.
- text: <code>sentensify("The.force.is.strong.with.this.one")</code> deve retornar <code>"The force is strong with this one"</code> .