Arbitwah / JSArrays

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JSArrays

Coding time! Create all these programs in a generic fashion: the program output should reflect any update in the array's content. Musketeers Write a program that: • Creates an array named musketeers containing values "Athos", "Porthos" and "Aramis". • Shows each array element using a for loop. • Adds the "D'Artagnan" value to the array. • Shows each array element using the forEach() method. • Remove poor Aramis. • Shows each array element using a for-of loop. Sum of values Write a program that creates the following array, then calculates and shows the sum of its values (42 in that case). const values = [3, 11, 7, 2, 9, 10]; Array maximum Write a program that creates the following array, then calculates and shows the array's maximum value. const values = [3, 11, 7, 2, 9, 10];

About


Languages

Language:JavaScript 100.0%