Assignment Arrays

1. Create an array that suggests a todo list

  • 1. A: Provide a feature to add items to the list
  • 2. Provide a function to remove the first element from the list
  • 3.  provide a function to add a priority to the todo list (i.e. this will be the first element of the todo list

2. Write a script to return the smallest and second smallest element of an array. (test sure that the array contains more than 2 elements).

3. Create a script in which you generate 1000 times two random numbers between 1 and 6 (the eyes of a dice). You include the 1000 results in an array. You also create an array of 11 elements in which you record how many times the computer has generated the number 2,3,4…12 (in other words, a histogram). You can print this last array on an HTML page. 

4. Request a text, and capitalize each word of your text
(- view split method (describe what the split function does, and use it in your solution)