Raffle

Example

Basic Features

Step 1: From the Cloud9 dashboard: Create a new workspace
Fill in the following text boxes on the form:
→ Workspace name: raffle Copy
→ Clone from Git or Mercurial URL: https://github.com/studentmrcode/raffle.git Copy
Click Create workspace button
Open index.html and click Run

Step 2: Update the names paragraph when a name is submitted.
Hint: Set the paragraph's content to what's already there, plus the name that was just submitted:
yourParagraphVariable.innerHTML = yourParagraphVariable.innerHTML + " " + yourTextBoxVariable.value;

Step 3: Make an empty array to store the submitted names.
Hint: Watch the array video. The video shows an illustration. Figure out how it relates to your code.

Step 4: Store the name in the array when a name is submitted.

Step 5: Pick a random name from the array when the pick winner button is clicked.
Hint: If you're having trouble, rewatch the random number video. The video shows an illustration. Figure out how it relates to your code.

Debugging help

Last topic Next topic