-
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 -
Write a JavaScript program to print the current window contents.
-
Write a JavaScript program to get the current date.
Expected Output : mm-dd-yyyy, mm/dd/yyyy or dd-mm-yyyy, dd/mm/yyyy -
Write a JavaScript program to find the area of a triangle where three sides are 5, 6, 7.
-
Write a JavaScript program to rotate the string 'w3resource' in the right direction. This is done by periodically removing one letter from the string end and attaching it to the front.
-
Write a JavaScript program to determine whether a given year is a leap year in the Gregorian calendar.
-
Write a JavaScript program to find out if 1st January will be a Sunday between 2014 and 2050.
-
Write a JavaScript program where the program takes a random integer between 1 and 10, and the user is then prompted to input a guess number. The program displays a message "Good Work" if the input matches the guess number otherwise "Not matched".
-
Write a JavaScript program to calculate the days left before Christmas.
-
Write a JavaScript program to calculate multiplication and division of two numbers (input from the user).
Sample form : sample form -
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 -
Write a JavaScript program to get the website URL (loading page).
-
Write a JavaScript exercise to create a variable using a user-defined name.
-
Write a JavaScript exercise to get the filename extension.
-
Write a JavaScript program to get the difference between a given number and 13, if the number is broader than 13 return double the absolute difference.
-
Write a JavaScript program to compute the sum of the two given integers. If the two values are the same, then return triple their sum.
-
Write a JavaScript program to compute the absolute difference between a specified number and 19. Returns triple the absolute difference if the specified number is greater than 19.
-
Write a JavaScript program to check a pair of numbers and return true if one of the numbers is 50 or if their sum is 50.
-
Write a JavaScript program to check whether a given integer is within 20 of 100 or 400.
-
Write a JavaScript program to check two given integers whether one is positive and another one is negative.
-
Write a JavaScript program to create another string by adding "Py" in front of a given string. If the given string begins with "Py" return the original string.
-
Write a JavaScript program to remove a character at the specified position in a given string and return the modified string.
-
Write a JavaScript program to create a new string from a given string by changing the position of the first and last characters. The string length must be broader than or equal to 1.
-
Write a JavaScript program to create another string from a given string with the first character of the given string added to the front and back.
-
Write a JavaScript program to check whether a given positive number is a multiple of 3 or 7.
-
Write a JavaScript program to create a string from a given string. This is done by taking the last 3 characters and adding them at both the front and back. The string length must be 3 or more.
-
Write a JavaScript program to check whether a string starts with 'Java' if it does not otherwise.
-
Write a JavaScript program to check whether two given integer values are in the range 50..99 (inclusive). Return true if either of them falls within the range.
-
Write a JavaScript program to check whether three given integer values are in the range 50..99 (inclusive). Return true if one or more of them are in the specified range.
-
Write a JavaScript program to check whether a string "Script" appears at the 5th (index 4) position in a given string. If "Script" appears in the string, return the string without "Script" otherwise return the original one.
-
Write a JavaScript program to find the largest of three given integers.
-
Write a JavaScript program to find the closest value to 100 from two numerical values.
-
Write a JavaScript program to check whether two numbers are in the range 40..60 or 70..100 inclusive.
-
Write a JavaScript program to find the largest number from the two given positive integers. The two numbers are in the range 40..60 inclusive.
-
Write a program to check whether a specified character exists between the 2nd and 4th positions in a given string.
-
Write a JavaScript program that checks whether the last digit of three positive integers is the same.
-
Write a JavaScript program to produce a new string that has the first 3 characters in lower case from a given string. If the string length is less than 3 convert all the characters to upper case.
-
Write a JavaScript program to check a student's total marks in various examinations. The student will get A+ grade if the total marks are in the range 89..100 inclusive, if the examination is "Final-exam" the student will receive A+ grade and total marks must be greater than or equal to 90. If the student gets an A+ grade, return true, otherwise return false.
-
Write a JavaScript program to compute the sum of the two given integers. If the sum is in the range 50..80 return 65 otherwise return 80.
-
Write a JavaScript program to check from two given integers whether one of them is 8 or their sum or difference is 8.
-
Write a JavaScript program to check a set of three numbers; if the three numbers are the same return 30; otherwise return 20; and if two numbers are the same return 40.
-
Write a JavaScript program to check whether three given numbers are increasing in strict or in soft mode.
Note: Strict mode -> 10, 15, 31 : Soft mode -> 24, 22, 31 or 22, 22, 31 -
Write a JavaScript program to check from three given numbers (non negative integers) that two or all of them have the same rightmost digit.
-
Write a JavaScript program to check from three given integers whether a number is greater than or equal to 20. It is less than the others.
-
Write a JavaScript program that checks two integer values and returns true if either one is 15 or if their sum or difference is 15.
-
Write a JavaScript program to check two given non-negative integers if one (not both) is a multiple of 7 or 11.
-
Write a JavaScript program to check whether a given number exists in the range 40..10000.
For example 40 presents in 40 and 4000 -
Write a JavaScript program to reverse a given string.
-
Write a JavaScript program to replace every character in a given string with the character following it in the alphabet.
-
Write a JavaScript program to capitalize the first letter of each word in a given string.
ishantl / js_exercise Goto Github PK
View Code? Open in Web Editor NEWJS Exercise questions