1. Put your code between the script tags below. Create an array with six values.
- A. Display the value in the third position in the array in the element with the id "answer1A" using document.getElementById()
- B. console.log() the length of the array
- C. Update the value in the fifth position in the array, and display it in the element with the id "answer1C"
- D. console.log() the type of (typeof) value in the first position.
2. Add your code below.
- A. Write a function with any name you'd like that returns the product of two parameters.
- B. create a button in html that invokes the function and returns the product of two numbers of your choosing to the element with the Id "answer2".
3. Complete the code between the script tags below.
- A. Create an object called "person" with three properties, "name", "age", "occupation", and a method called newJob() that takes one argument and updates the value of the "occupation" property.
- B. Update the value of "occupation" using the newJob method, and display this value in the element with the id "answer3" using document.getElementById.
Complete the code below to display:
- A. The "title" of this html document in the first button.
- B. The URL of this html document in the second button.
Hint: use the .title and .URL properties of the document object.