0% found this document useful (0 votes)
22 views1 page

JavaScript Programs for Beginners

The document provides 5 examples of JavaScript programs including a calculator using switch case, removing duplicate elements from an array, sorting student names by marks and calculating class average, merging and de-duplicating two arrays, and printing prime numbers between 0 and a user-input number.

Uploaded by

Tanishka Patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views1 page

JavaScript Programs for Beginners

The document provides 5 examples of JavaScript programs including a calculator using switch case, removing duplicate elements from an array, sorting student names by marks and calculating class average, merging and de-duplicating two arrays, and printing prime numbers between 0 and a user-input number.

Uploaded by

Tanishka Patil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CSS - Imp programs

1. Write a simple calculator program using switch case in java script.


2. Write a java script program that will remove the duplicate element from
an array.
3. Write a java script program that will display list of students in ascending
order according to the marks and calculate the average performance of
the class.
Student name Marks
Amit 34
Sumit 45
Rakesh 27

4. Write a java script function to merge two arrays and remove all duplicate
values.

5. Write a simple java script code to print all prime numbers between 0 to n .
Take input from user.

You might also like