Exercises: Sample Array: Mycolor ("Red", "Green", "White", "Black") Expected Output
Exercises: Sample Array: Mycolor ("Red", "Green", "White", "Black") Expected Output
Exercises
Note: Every CODE & Output should contain your ROLL Number for copyright.
1. Write a simple JavaScript program to join all elements of the following array
into a string.
Sample array : myColor = ["Red", "Green", "White", "Black"];
Expected Output :
"Red,Green,White,Black"
"Red+Green+White+Black"
3. Write a JavaScript program to compute the sum of each individual index value
from the given arrays. Sample array:
var A1 = [3,4,6,2,5];
var B2 = [1,4,6,2,5];
Expected Output:
4 8 12 4 10
Page 1 of 2
SOLUTION
Q1:
Q2:
Q3:
Page 2 of 2