+ 8
Can we generate random 【ALPHABETS】with Math.random() method ?
Can we generate random ALPHABET not a string or group of ALPHABETS . Only a single ALPHABET out of 26. For example -: onclick(a,z) <script> document.write(Math.floor(Math.random()*(a,z))) </script> Is it possible have such function. || Note--:Only a individual(single) ALPHABET should generated. Not a string or Array ||
4 ответов
+ 13
document.write(String.fromCharCode(Math.floor(65+Math.random()*100%26)))
+ 7
Maybe with the switch loop you could assign a letter to a specific number.. so for example a = 1, b =2...
+ 7
This may be what you need.
https://code.sololearn.com/WF44SaccHLvv/?ref=app
+ 4
Thanks everyone for your precious and wonderful help..