I am trying to generate a random words and push each one individually to the array, the problem is, i am getting list of words that starts from the first letter increased by one like this:
['a','ab','abc','abcd'] and so on
here is my code:
var word = "";
var texts = [];
var letters = "абвгдеёжзийклмнопрстуфхцчшщъыьэюя";
for (var i = 0; i < 10; i++){
word += letters.charAt(Math.floor(Math.random() * letters.length))
texts.push(
{
"id":i,
"name":word,
selected: false
}
)
}
what i need is to push a complete word to the list.
0 to numWordsand inside that one from0 to numLetters.FlaskandVueJS:)