Sunday, October 2, 2016

Excited Mad Lib

Today for programming, I made a Mad Lib using JavaScript.  First go try my Mad Lib here, then I'll tell you how I did it.

Did you do the Mad Lib?  Post your story as a comment!

Here's what I did:

First I wrote the correct mad lib.  Then I wrote it on the computer like this:


"var" means variable, which is some text or a number.  "prompt" will open a window to ask you for information.

After getting the vars, you must tell the computer the other words you wrote for the story.  If you don't write it, it won't work.  At then end "document.write" tells the computer to write the story on the webpage.

Here is my story:



How was your story?  Do you think your story was good?  Or funny?  Do you think you can do all this? If you are better than me and you wrote a long story please tell me.

No comments:

Post a Comment