LETTERS / NUMBER GENERATOR (Js)

In my game i want to have the player type in a combination of 3 letters that have been randomly generated by the game.

My problem: i am not sure how to generate numbers and assign them as letter… ← i assumed i couldn’t randomly generate letters so I thought maybe doing the above could work. I am not very good at programming at all and I have tried typing in things like

var randFloat = Random.Range(1.0,3.0);

the thing is I am not sure if that means it is any number (with decimals) or whole numbers because when i looked at it I didn’t know what it was on about… Furthermore, I have no idea how to use it in other parts of my script.

In my game I want to have other things like if the player pressed the wrong letter then they lose, but i think I can do that on my own.
My main problem is I have no idea where to put the scripts or how to implement them… as in when I type randFloat etc. how do I get it to actually work and generate numbers for me to see so I can call them and make the game.

(tried to explain my best)

Thanks.

With the Random.Range function you can generate an int or a float, depending of the type of the parameters. Random.Range( 0, 5 ) can give you 0, 1, 2, 3 or 4 (not 5), Random.Range(0.0, 5.0 can return everything between 0.0 and 5.0, such as 1.25 or 4.325.

Based on that you can use an array containing all the letters in alphabet and chose one with a random index Random.Range( 0, myArray.Length );

It’s possible to make sure that you don’t pick the same letter twice, but it’s a bit more complicated. I’ll explain it if need be.

hello, iam a newbie. and i want to make a puzzle game for finally exam in my school. i want to ask,
how to random character like flip word games or word jolt games ??