-
Write a JavaScript program to display the current day and time in the following format. Sample Output : Today is : Friday. Current time is : 4 PM : 50 : 22
-
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 lengths of the three of its sides are 5, 6, 7.
-
Write a JavaScript program to rotate the string 'w3resource' in right direction by periodically removing one letter from the end of the string and attaching it to the front.
-
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".
-
Write a JavaScript program to convert temperatures to and from Celsius, Fahrenheit.
Expected Output :
60°C is 140 °F
45°F is 7.222222222222222°C
-
Write a JavaScript program to get the current website URL (loading page).
-
Write a JavaScript program to compute the sum of the two given integers. If the two values are same, then returns triple their sum.
-
Write a JavaScript program to compute the absolute difference between a specified number and 19.
-
Write a JavaScript program to check two given numbers and return true if one of the number is 50 or if their sum is 50.
-
Write a JavaScript program to check a given integer is within 20 to 100.
-
Write a JavaScript program to create a new string adding "Py" in front of a given string. If the given string begins with "Py" then return the original string.
-
Write a JavaScript program to create a new string from a given string changing the position of first and last characters. The string length must be greater than or equal to 1.
-
Write a JavaScript program check if a given positive number is a multiple of 3 or a multiple of 7.
-
Write a JavaScript program to create a new string from a given string taking the last 3 characters and added at both the front and back. The string length must be 3 or more.
-
Write a JavaScript program to check if a string starts with 'Java' and false otherwise.
-
Write a JavaScript program to check if three given integer values are in the range 50..99 (inclusive). Return true if one or more of them are in the said range.
-
Write a JavaScript program to check if a string "Script" presents at 5th (index 4) position in a given string, if "Script" presents 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 a value which is nearest to 100 from two different given integer values.
-
Write a JavaScript program to check a given string contains 2 to 4 numbers of a specified character.
-
Write a JavaScript program to check if the last digit of the three given positive integers is same.
-
Write a JavaScript program to check the total marks of a student 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 get A+ grade and total marks must be greater than or equal to 90. Return true if the student get A+ grade or false otherwise.
-
Write a JavaScript program to compute the sum of the two given integers, If the sum is in the range 50..80 return 65 other wise return 80.
-
Write a JavaScript program to check from two given integers if either one is 8 or their sum or difference is 8.
-
Write a JavaScript program to check three given numbers, if the three numbers are same return 30 otherwise return 40 and if two numbers are same return 20.
-
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 of a given string.
-
Write a JavaScript program to convert the letters of a given string in alphabetical order.
-
Write a JavaScript program to check if the characters a and b are separated by exactly 3 places anywhere (at least once) in a given string.
-
Write a JavaScript program to count the number of vowels in a given string.
-
Write a JavaScript program to check if a given string contains equal number of p's and t's present.
-
Write a JavaScript program to extract the first half of a string of even length.
-
Write a JavaScript program to create a new string without the first and last character of a given string.
-
Write a JavaScript program to test if a string end with "Script". The string length must be greater or equal to 6.
-
Write a JavaScript program to compute the sum of three elements of a given array of integers of length 3.
-
Write a JavaScript program to rotate the elements left of a given array of integers of length 3.
-
Write a JavaScript program to check if 1 appears in first or last position of a given array of integers. The array length must be greater or equal to 1.
-
Write a JavaScript program to check if the first and last elements are equal of a given array of integers length 3.
-
Write a JavaScript program to find the larger value between the first or last and set all the other elements with that value. Display the new array.
-
Write a JavaScript program to create a new array taking the first and last elements from a given array of integers and length must be greater or equal to 1.
-
Write a JavaScript program to test if a given array of integers contains 30 and 40 twice.
-
Write a JavaScript program to swap the first and last elements of a given array of integers.