How to Code a Phrasal Template Word Game Using Javascript

Use a Notepad-type program or application to write up a story., Add in the blanks., Convert your new story into code.

3 Steps 1 min read Easy

Step-by-Step Guide

  1. Step 1: Use a Notepad-type program or application to write up a story.

    Do not add in the blanks just yet.

    Example:
    One sunny day, Tom went to the grocery store to buy some ham.

    When he got home, he discovered that his sister had already bought some ham while he was gone.
  2. Step 2: Add in the blanks.

    You may add in blanks where there are names, places, nouns, adjectives, verbs, adverbs, prepositions, numbers, animals, body parts, foods, etc.

    Example:
    One (Adjective) day, (Male Name) went to the (Place) to (Verb) some (Plural Food).

    When he got home, he (Past Tense Verb) that his (Family Member) had already bought some (Same Plural Food) while he was gone. , The variables will be defined in the next step, so don't worry about them just yet.

    Example: alert ('One ' + adj + ' day, ' + maleName +  ' went to the ' + place + ' to ' + verb + ' some ' + pluralFood + '.

    When he got home, he ' + pastVerb + ' that his ' + famMember + ' had already bought some ' + sameFood + ' while he was gone. ')
  3. Step 3: Convert your new story into code.

Detailed Guide

Do not add in the blanks just yet.

Example:
One sunny day, Tom went to the grocery store to buy some ham.

When he got home, he discovered that his sister had already bought some ham while he was gone.

You may add in blanks where there are names, places, nouns, adjectives, verbs, adverbs, prepositions, numbers, animals, body parts, foods, etc.

Example:
One (Adjective) day, (Male Name) went to the (Place) to (Verb) some (Plural Food).

When he got home, he (Past Tense Verb) that his (Family Member) had already bought some (Same Plural Food) while he was gone. , The variables will be defined in the next step, so don't worry about them just yet.

Example: alert ('One ' + adj + ' day, ' + maleName +  ' went to the ' + place + ' to ' + verb + ' some ' + pluralFood + '.

When he got home, he ' + pastVerb + ' that his ' + famMember + ' had already bought some ' + sameFood + ' while he was gone. ')

About the Author

M

Michael Wright

Committed to making pet care accessible and understandable for everyone.

41 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: