Since the letters were interesting, and sometimes they seem to make words, I thought it would be interesting to bring words into the composition. I found a list of just over 5000 most common words in the English language, and turned them into an array, which is loaded from a separate file called words.js
The probabilities for the createBox() function have been updated to include a 20% chance of adding a word to the compostion. There is a 20% chance of adding a letter or circle and recatangles remain at a 40% chance.
Code Snippets for 12
I have a file called words.js, which includes an array of 5007 words. A piece of this array is shown in the snippet below.
I defined a few more variables which are used inside the createBox() function, which has been updated to provide a 20% chance of pulling a word from the array of 5007 words loaded into the page.