Make an array called names that stores the words Jack, Jim, Bob, Smith, Jacob, William in that order. Using .slice() make a variable called names2 which will print the second and third index from the names array and add a new element called "David". names2 should include the second index, third index and "David." *

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter8: Arrays
Section: Chapter Questions
Problem 9PE
icon
Related questions
Question

Make an array called names that stores the words Jack, Jim, Bob, Smith, Jacob, William in that order. Using .slice() make a variable called names2 which will print the second and third index from the names array and add a new element called "David". names2 should include the second index, third index and "David." *

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT