How can I make the symbols match each other? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can I make the symbols match each other?

In this code, it's a random word generator I want the symbols to match each other, I'm not sure how to do that, so can someone help? https://code.sololearn.com/WBJKN5qxNy21/#js

30th May 2020, 12:08 AM
Danial Azadpour
Danial Azadpour - avatar
1 Answer
+ 1
Took a while to understand your question... The solution is easy: 1. Add empty string in pre-sentence array 2. Generate your random value for both pre- and post symbol and store it into a var 3. Use the var to access the symbols in the both arrays at the same position Yeah, a bit dirty. Btw. the sentence which confused me so much that I understood your question was: "¡La ducha es demasiado grande?". Undirty.
30th May 2020, 12:14 AM
Sandra Meyer
Sandra Meyer - avatar