help with school assignment
hey all, i've been failing in my attempt to grasp JS. this is my last assignment..any help would be greatly appreciated...
Write a program that will ask the user to enter ten items (names of people, numbers,
addresses, or whatever). Use a prompt box to get the userís input. Youíll need to put it
in a loop of some sort.
After youíve gotten all ten items, sort them. You can use whatever sorting method you
prefer (Iíd suggest the bubble sort). Display the items in order, using either alert boxes or
You can use the html framework on the next page for your program if you want.
After displaying the items, ask the user to enter an item to search for. Use the binary
search (NOT the serial search!) to find the item in the list and display the itemís location
in the list. For example if the item was the first in the list, say that it was item # 1, the
second item is item # 2, etcetera. Remember, we want to tell the user which place the
item is in, not which element it is! Donít tell the user that it is item # 0 if it is the first
one in the list. The user wonít understand that weíre indexing from zero.