js generate random list of names with for loop

Solutions on MaxInterview for js generate random list of names with for loop by the best coders in the world

showing results for - "js generate random list of names with for loop"
Luis
29 Nov 2019
1function amppari() {
2var text = "";
3var text1 = "";
4var text2 = "";
5var text3="";
6var text4= "";
7var text5= "";
8
9
10  var possible = "abcdefghijklmnopqrstuvwxyzöä";
11
12  for (var i = 0; i < 6; i++){
13    text += possible.charAt(Math.floor(Math.random() * possible.length));
14text1 += possible.charAt(Math.floor(Math.random() * possible.length));
15text2 += possible.charAt(Math.floor(Math.random() * possible.length));
16text3 += possible.charAt(Math.floor(Math.random() * possible.length));
17text4 += possible.charAt(Math.floor(Math.random() * possible.length));
18text5 += possible.charAt(Math.floor(Math.random() * possible.length));
19   
20
21}
22console.log(text+"\t"+text1+"\n"+text2+"\t"+text3+"\n"+text4+"\t"+text5+"\t");
23
24}
25amppari();