For each of the exercises below, assume you are starting with the following people array. and use javascript var people = ["Greg", "Mary", "Devon", "James"]; Write the command to add "Matt" to the front of the array. Write the command to add your name to the end of the array. Write the command to make a copy of the array using slice. The copy should NOT include "Mary" or "Matt".
For each of the exercises below, assume you are starting with the following people array. and use javascript var people = ["Greg", "Mary", "Devon", "James"]; Write the command to add "Matt" to the front of the array. Write the command to add your name to the end of the array. Write the command to make a copy of the array using slice. The copy should NOT include "Mary" or "Matt".
Chapter6: Using Arrays
Section: Chapter Questions
Problem 5E
Related questions
Question
For each of the exercises below, assume you are starting with the following people array. and use javascript
var people = ["Greg", "Mary", "Devon", "James"];
- Write the command to add "Matt" to the front of the array.
- Write the command to add your name to the end of the array.
- Write the command to make a copy of the array using slice. The copy should NOT include "Mary" or "Matt".
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT