I'm currently using Visual Studio to build my website and I'm getting stuck on my username generator. I need it because I don't want any inappropriate words and this is a children's website so I don't want to use real information. I thought about using an array of strings and then adding them together but for some reason, I can't get it to work -__- any help would be appreciated. I'm in coding boot camp and my teacher said this would be a useful place for information. Thanks.
So far, this is what I have:
var a = ["Small", "Blue", "Ugly"];
var b = ["Bear", "Dog", "Banana"];
var rA = Math.floor(Math.random()*a.length);
var rB = Math.floor(Math.random()*b.length);
var name = a[rA] + b[rB];
alert(name);
Now my issue is I'm trying to write a function that will generate a new name with every click. I know I need function myFunction() and an onclick= event. Hopefully this is not a vague as before.