Home | Functions
Basic Exercises
Sample Output : Today is : Friday.
Current time is : 4 PM : 50 : 22
2. Write a JavaScript program to get the current date.
Expected Output :
mm-dd-yyyy, mm/dd/yyyy or dd-mm-yyyy, dd/mm/yyyy
3. Write a JavaScript program to find the area of a triangle where lengths of the three of its sides are 5, 6, 7.
4. Write a JavaScript program to rotate the string 'codeisfun' in right direction by periodically removing one letter from the end of the string and attaching it to the front.
5. Write a JavaScript program to determine whether a given year is a leap year in the Gregorian calendar.
6. Write a JavaScript program to find 1st January is being a Sunday between 2014 and 2050.
8. Write a JavaScript program to calculate days left until next Christmas.
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
11. Write a JavaScript program to get the website URL (loading page).
Home | Functions