DICT Y3S2 JAVA SCRIPT Assignment Due on 29th Thursday 2025
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 'The InfoMatrix Digital Services' 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 where the program takes a random integer between
1 to 10, the user is then prompted to input a guess number. If the user input
matches with guess number, the program will display a message "Good Work"
otherwise display a message "Not matched".
8. Write a JavaScript program to calculate days left until next Christmas.
9. Write a JavaScript program to calculate multiplication and division of two
numbers (input from user).
10. Write a JavaScript program to convert temperatures to and from Celsius,
Fahrenheit. [ Formula : c/5 = (f-32)/9 [ where c = temperature in Celsius and f =
temperature in Fahrenheit ] Expected Output : 60°C is 140 °F 45°F is
7.222222222222222°C