0% found this document useful (0 votes)
45 views

Exercises: Sample Array: Mycolor ("Red", "Green", "White", "Black") Expected Output

The document provides instructions for an assignment on web engineering. It includes 3 exercises on JavaScript programs involving joining an array into a string, summing multiples of 3 and 5 under 300, and computing sums of individual array index values.

Uploaded by

muzaffar khan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

Exercises: Sample Array: Mycolor ("Red", "Green", "White", "Black") Expected Output

The document provides instructions for an assignment on web engineering. It includes 3 exercises on JavaScript programs involving joining an array into a string, summing multiples of 3 and 5 under 300, and computing sums of individual array index values.

Uploaded by

muzaffar khan
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

SIR SYED UNIVERSITY OF ENGINEERING & TECHNOLOGY

COMPUTER SCIENCE DEPARTMENT


FALL 2019
WEB ENGINEERING (CS-118)
Assignment 2
Semester: II Batch: 2019
Due Date: 16-JULY-2019 Max Marks: 2

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"

2. Write a JavaScript program to sum the multiples of 3 and 5 under 300.

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

You might also like