0% found this document useful (0 votes)
10 views2 pages

JavaScript Programs

The document contains three JavaScript programming tasks: swapping two variables, calculating the sum of the first N natural numbers, and finding the factorial of a number. Each task is followed by a placeholder for sample output. The document serves as a guide for writing basic JavaScript programs.

Uploaded by

vpsree3
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)
10 views2 pages

JavaScript Programs

The document contains three JavaScript programming tasks: swapping two variables, calculating the sum of the first N natural numbers, and finding the factorial of a number. Each task is followed by a placeholder for sample output. The document serves as a guide for writing basic JavaScript programs.

Uploaded by

vpsree3
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

1. Write a Java Script program to swap two variables.

SAMPLE OUTPUT

2. Write a Java Script program to find the sum of first N natural numbers.
SAMPLE OUTPUT

3. Write a Java Script program to find the factorial of a number.

SAMPLE OUTPUT

You might also like