<sectionid="description"> El método de <code>join</code> se utiliza para unir los elementos de una matriz para crear una cadena. Toma un argumento para el delimitador que se usa para separar los elementos de la matriz en la cadena. Aquí hay un ejemplo: <blockquote> var arr = ["Hola", "Mundo"]; <br> var str = arr.join (""); <br> // Establece str en "Hello World"</blockquote></section>
<sectionid="instructions"> Use el método de <code>join</code> (entre otros) dentro de la función de <code>sentensify</code> para hacer una oración de las palabras en la cadena <code>str</code> . La función debe devolver una cadena. Por ejemplo, "I-like-Star-Wars" se convertiría a "Me gusta Star Wars". Para este desafío, no utilice el método de <code>replace</code> . </section>
- text: Su código debe utilizar el método de <code>join</code> .
testString: 'assert(code.match(/\.join/g), "Your code should use the <code>join</code> method.");'
- text: Su código no debe utilizar el método de <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> debe devolver una cadena.
testString: 'assert(typeof sentensify("May-the-force-be-with-you") === "string", "<code>sentensify("May-the-force-be-with-you")</code> should return a string.");'
- text: <code>sentensify("May-the-force-be-with-you")</code> debe devolver <code>"May the force be with you"</code> .
testString: 'assert(sentensify("May-the-force-be-with-you") === "May the force be with you", "<code>sentensify("May-the-force-be-with-you")</code> should return <code>"May the force be with you"</code>.");'
- text: <code>sentensify("The.force.is.strong.with.this.one")</code> debe devolver <code>"The force is strong with this one"</code> .
testString: 'assert(sentensify("The.force.is.strong.with.this.one") === "The force is strong with this one", "<code>sentensify("The.force.is.strong.with.this.one")</code> should return <code>"The force is strong with this one"</code>.");'
testString: 'assert(sentensify("There,has,been,an,awakening") === "There has been an awakening", "<code>sentensify("There,has,been,an,awakening")</code> should return <code>"There has been an awakening"</code>.");'