Example: Entering form data into an array

In this example, a form is used for entry of items into an array. As each item is entered, the item value is displayed along with its position. The first position is 0.

Note:

Hints:

  • undefined
1
2
window.onload = startFunction;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
<!DOCTYPE html>
<html lang="en">
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX