This week’s E-Learning Heroes challenge focused on using Javascript to generate random words and random phrases. I’ve used Javascript once before for Raindrop Math so I figured it was time to try it again. Fortunately, it is getting easier 🙂 I used this tutorial to help me get started and a bit of troubleshooting assistance to find a pesky double quotation mark error from Zsolt Olah, the javascript king.
My goal this week was to create something that would generate random simple sentences suitable for kids who are learning to read, specifically my young nieces and nephews.
I started with a simple sentence “The cat likes to climb” and then created a variable for the animal, like or dislike, and movement.
Once I had my code working, I added some graphics, and decided that like in a children’s book, the graphic image should give clues to the kids about the sentence, so I added triggers that would change the background image based on the animal referred to in the sentence.
Check out the interaction and please leave your feedback.