Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
17 views

Java Script Assignment

The document provides examples of JavaScript programs to print the current day and time, print the contents of the current window, get the current date, calculate the area of a triangle, rotate a string by removing one letter and adding it to the front, determine if a year is a leap year, find if 1st January falls on a Sunday between 2014-2050, and calculate multiplication and division of user-input numbers.

Uploaded by

Mayank Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views

Java Script Assignment

The document provides examples of JavaScript programs to print the current day and time, print the contents of the current window, get the current date, calculate the area of a triangle, rotate a string by removing one letter and adding it to the front, determine if a year is a leap year, find if 1st January falls on a Sunday between 2014-2050, and calculate multiplication and division of user-input numbers.

Uploaded by

Mayank Singh
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a JavaScript program to display the current day and time in the following format.

Sample Output : Today is : Tuesday.

Current time is : 10 PM : 30 : 38

2. Write a JavaScript program to print the contents of the current window.

3. Write a JavaScript program to get the current date.

Expected Output :

mm-dd-yyyy, mm/dd/yyyy or dd-mm-yyyy, dd/mm/yyyy

4. Write a JavaScript program to find the area of a triangle where lengths of the three of its sides are 5,
6, 7.

5. Write a JavaScript program to rotate the string 'uuresource' in right direction by periodically removing
one letter from the end of the string and attaching it to the front.

6. Write a JavaScript program to determine whether a given year is a leap year in the Gregorian
calendar.

7. Write a JavaScript program to find 1st January is being a Sunday between 2014 and 2050.

8. Write a JavaScript program to calculate multiplication and division of two numbers (input from user).

You might also like