Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Arrays and Loops Use a loop to create an array of 10 elements called numbers . The values of the elements of the arrays should

Arrays and Loops

Use a loop to create an array of 10 elements called numbers. The values of the elements of the arrays should be the numbers 1 to 10.

Use push to add the number 20 to the end of the array.

Use unshift to add the number 0 to the beginning of the numbers array.

Use splice to remove the numbers 5 and 8 from the array.

Use a loop to console log each of the individual values of the numbers array.

Cloning

Create an ordered list of 10 items.

Create button that when clicked will duplicate the same order list of items and append and display the duplicate list next the first order list

add an additional button named remove and when clicking remove button, it will remove the cloned items.

Template

 var people= [ { "age": 24, "name": "Jerry Hale", "company": "PHOTOBIN", "email": "jerryhale@photobin.com", "phone": "+1 (980) 445-3351" }, { "age": 31, "name": "Monique Dixon", "company": "COMSTRUCT", "email": "moniquedixon@comstruct.com", "phone": "+1 (872) 497-3167" }, { "age": 37, "name": "Joan Mccullough", "company": "XYQAG", "email": "joanmccullough@xyqag.com", "phone": "+1 (933) 421-2529" }, { "age": 33, "name": "Jacobs Mayer", "company": "ISONUS", "email": "jacobsmayer@isonus.com", "phone": "+1 (818) 413-3992" }, { "age": 39, "name": "Rosa Chandler", "company": "SNACKTION", "email": "rosachandler@snacktion.com", "phone": "+1 (935) 474-2761" }, { "age": 26, "name": "Crawford Mason", "company": "NURPLEX", "email": "crawfordmason@nurplex.com", "phone": "+1 (890) 444-3896" }, { "age": 38, "name": "Haney Carr", "company": "KYAGORO", "email": "haneycarr@kyagoro.com", "phone": "+1 (920) 483-2898" } ] 

Using the following object:

Create a template that displays the following fields

Name

Age

company

email

phone

Traversing

Use the attached html page (traversing.html)

Add the code to the page that upon clicking the button:

will change the the color of the text in section 1 line 2

change the text in section 2 line 3

read the value to the console in section 3 line 1

Only use the one button that is provided and you should not change any of the class names.

Section 1

this is text 1

change the color of this text

this is text 3

Section 2

this is text 1

this is text 2

change this text

Section 3

read me to the console

this is text 2

this is text 3

click me

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What are the difficulties in completing a loan assignment?

Answered: 1 week ago