JS.Basic

JavaScript is a cross-platform, object-oriented scripting language. It is a small and lightweight language. Inside a host environment ( a web browser), JavaScript can be connected to the objects of its environment to provide programmatic control over them.

Task 1

Write a JavaScript program to display the current day and time in the following format. Today is : Tuesday. Current time is : 10 PM : 30 : 38

Task 2

Write a JavaScript program to check from three given numbers (non negative integers) that two or all of them have the same rightmost digit.

Task 3

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.

Task 4

Write a JavaScript program to create new string with first 3 characters are in lower case from a given string. If the string length is less than 3 convert all the characters in upper case.

Task 5

Write a JavaScript program to check three given numbers, if the three numbers are same return 30 otherwise return 20 and if two numbers are same return 40.

Task 6

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.

Task 7

Write a JavaScript program to capitalize the first letter of each word of a given string.

Task 8

Write a JavaScript program to check if a given string contains equal number of p's and t's present.

Task 9

Write a JavaScript program to convert the letters of a given string in alphabetical order.

Top