I would love to hear about the different ways that you can think of to use random letter generation in your own projects. Please share them in the comments.
Thank you for sharing your creative project idea and the JavaScript code for generating random letters.
After reviewing your project, we see that instead of creating each state for each letter which takes time, you can use the function object.text('new text') to change letter prez.object('tile').text(String.fromCharCode(prez.variable('num') + 64));
I am familiar with the Math.floor() method as well.
I have often preferred the Math.ceil version as it always seemed to do the same thing without issue.
As I was thinking more critically about this, however, it came to light that it is possible Math.random() could produce a perfect zero - in which case - the result would remain as zero. I must admit I had not considered this nor do I think I have had it happen but I do see now the better logic of using the Math.floor() method instead.
Using the idea regarding object.text(‘new text’) is one that I had not considered. Interesting approach to play with. Thank you.