JavaScript Exercises
SOOPRO Pathshala provides JavaScript Exercises
Day 1
JavaScript Day 1
SOOPRO Pathshala Exercises
Day 1
1. Write a javascript program to display Hello World.
2. Write a javascript program to display your full name.
3. Write a javascript program to display your fav color.
4. Write a javascript program to display your hobby.
5. Write a javascript program to display your fav game name.
Day 2
JavaScript Day 2
SOOPRO Pathshala Exercises
Day 2
1. Write a javascript program to display your father's name.
2. Write a javascript program to display current date.
3. Write a javascript program to display current date and time.
4. Write a javascript program to display your fav foods.
5. Write a javascript program to display your fav subject name.
Day 3
JavaScript Day 3
SOOPRO Pathshala Exercises
Day 3
1. Write a javascript program to print square of any given number.
2. Write a javascript program to print cube of any given number.
3. Write a javascript program to print simple interest of given input.
4. Write a javascript program to print area of rectangle of given length and width.
5. Write a javascript program to print area of circle of given radius.
Day 4
JavaScript Day 4
SOOPRO Pathshala Exercises
Day 4
1. Write a javascript program to print circum of circle and diameter of circle of given radius.
2. Write a javascript program to print area of trinagle of given base and height.
3. Write a javascript program to print concatenation of first and last name of given value.
4. Write a javascript program to print division of two given integer numbers.
5. Write a javascript program to print multiplication of two given integer numbers.
Day 5
JavaScript Day 5
SOOPRO Pathshala Exercises
Day 5
1. Write a javascript program to print square of any number by user input.
2. Write a javascript program to print cube of any number by user input.
3. Write a javascript program to print simple interest by user input.
4. Write a javascript program to print area of rectangle by user input.
5. Write a javascript program to print area of circle by user input.
Day 6
JavaScript Day 6
SOOPRO Pathshala Exercises
Day 6
1. Write a javascript program to print circum of circle by user input
2. Write a javascript program to print area of traingle by user input.
3. Write a javascript program to pritn concatenation of first and last name by user input.
4. Write a javascript program to print division of two numbers by user input.
5. Write a javascript program to print multiplication of two numbers by user input.
Day 7
JavaScript Day 7
SOOPRO Pathshala Exercises
Day 7
1. Write a javascript program to print sum of two integer numbers by user input.
2. Write a javascript program to print sum of three integer numbers by user input.
3. Write a javascript program to print sum of two float numbers by user input.
4. Write a javascript program to print sum of two double numbers by user input.
5. Write a javascript program to print sum of three float numbers by user input.
Day 8
JavaScript Day 8
SOOPRO Pathshala Exercises
Day 8
1. Write a javascript program to print sum of three double numbers by user input.
2. Write a javascript program to print sum of two long numbers by user input.
3. Write a javascript program to print multiply of two float numbers by user input.
4. Write a javascript program to print division of two float numbers by user input.
5. Write a javascript program to print division of two double numbers by user input.
Day 9
JavaScript Day 9
SOOPRO Pathshala Exercises
Day 9
1. Write a javascript program to print maximum of two numbers by user input.
2. Write a javascript program to print minimum of two numbers by user input.
3. Write a javascript program to print difference of maximum and minimum of three integer numbers by user input.
4. Write a javascript program to print even or odd of any number by user input.
5. Write a javascript program to print positive or negative of any number by user input.
Day 10
JavaScript Day 10
SOOPRO Pathshala Exercises
Day 10
1. Write a javascript program to print valid for vote if age is greater than 18 else print not valid for vote, by user input.
2. Write a javascript program to take and display your first name by user input.
Day 11
JavaScript Day 11
SOOPRO Pathshala Exercises
Day 11
1. Write a javascript program to take your first name and display its length by user input.
2. Write a javascript program to print grade of marks by user input.
Day 12
JavaScript Day 12
SOOPRO Pathshala Exercises
Day 12
1. Write a javascript program to print week name by user input.
Day 13
JavaScript Day 13
SOOPRO Pathshala Exercises
Day 13
1. Write a javascript program to print area of sphere.
2. Write a javascript program to return area of sphere.
3. Write a javascript program to return maximum among three numbers by user input.
4. Write a javascript program to return reverse of your name by user input.
Day 14
JavaScript Day 14
SOOPRO Pathshala Exercises
Day 14
1. Write a javascript program to add 5 to odd number and 4 to even numbers, take input from user.
2. Write a javascript program to check palindrome number.
3. Write a javascript program to check armstrong number.
4. Write a javascript program to print last three letters of your first name.
5. Write a javascript program to print first three letters of your first name.
Day 15
JavaScript Day 15
SOOPRO Pathshala Exercises
Day 15
1. Write a javascript program create single dimensional array.
2. Write a javascript program to sort single dimensional array.
3. Write a javascript program to sort single dimensional array in descending order.
4. Write a javascript program to print fibonacci series.
Day 16
JavaScript Day 16
SOOPRO Pathshala Exercises
Day 16
1. Write a javascript program create simple login form.
2. Write a javascript program to create login form having admin and user credentials.
Day 17
JavaScript Day 17
SOOPRO Pathshala Exercises
Day 17
1. Write a javascript program create details form.
2. Write a javascript program to create registration form.
Day 18
JavaScript Day 18
SOOPRO Pathshala Exercises
Day 18
1. Write a JavaScript program to compute the sum of an array of integers.
2. Write a JavaScript program to get the first n Fibonacci numbers.
3. Write a JavaScript program to calculate the factorial of a number.
4. Write a JavaScript function that reverses a number.
Day 19
JavaScript Day 19
SOOPRO Pathshala Exercises
Day 19
1. Write a JavaScript function that returns a string that has letters in alphabetical order.
2. Write a JavaScript function that accepts a string as a parameter and converts the first letter of each word.
3. Write a JavaScript function that accepts a string as a parameter and finds the longest word within the string.
4. Write a JavaScript function that accepts a string as a parameter and counts the number of vowels within the string.
Day 20
JavaScript Day 20
SOOPRO Pathshala Exercises
Day 20
1. Write a JavaScript function that takes an array of numbers and finds the second lowest and second greatest numbers, respectively.
2. Write a JavaScript function to extract unique characters from a string.
3. Write a JavaScript function that accepts a list of country names as input and returns the longest country name as output.
4. Write a JavaScript program to pass a 'JavaScript function' as a parameter.
Day 21
JavaScript Day 21
SOOPRO Pathshala Exercises
Day 21
1. Write a JavaScript function to find the longest substring in a given string without repeating characters.
2. Write a JavaScript program to pass a 'JavaScript function' as a parameter.
3. Write a JavaScript function to get the function name.
4. Write a JavaScript program to pass a 'JavaScript function' as a parameter.
Day 22
JavaScript Day 22
SOOPRO Pathshala Exercises
Day 22
1. Write a JavaScript program that displays the largest integer among two integers.
2. Write a JavaScript conditional statement to find the largest of five numbers. Display an alert box to show the results.
3. Write a JavaScript program to find the Armstrong numbers of 3 digits.
4. Write a JavaScript function to generate a random integer.
Day 23
JavaScript Day 23
SOOPRO Pathshala Exercises
Day 23
1. Write a JavaScript function to find the lowest value in an array.
2. Write a JavaScript function to get the least common multiple (LCM) of two numbers.
3. Write a JavaScript function to get the least common multiple (LCM) of more than 2 integers.
4. Write a JavaScript function to find out if a number is a natural number or not.
Day 24
JavaScript Day 24
SOOPRO Pathshala Exercises
Day 24
1. Write a JavaScript function to calculate the product of values in an array.
2. Write a JavaScript function that converts Roman numerals to integers.
3. Write a JavaScript function to get all prime numbers from 0 to a specified number.
4. Write a JavaScript function to find out if a number is a natural number or not.
Day 25
JavaScript Day 25
SOOPRO Pathshala Exercises
Day 25
1. Write a JavaScript program to take user input and display it on paragraph, using window object method prompt().
2. Write a JavaScript program to use window object method confirm().
3. Write a JavaScript program to open new window using window object method open().
4. Write a JavaScript program to close current window using window object method close().
Day 26
JavaScript Day 26
SOOPRO Pathshala Exercises
Day 26
1. Write a javascript program to use setTimeout() method of window object.
2. Write a JavaScript program to use clearTimeout() method of window object.
Day 27
JavaScript Day 27
SOOPRO Pathshala Exercises
Day 27
1. Write a javascript progrm to use document.write() method.
2. Write a JavaScript program to use document.writeln() method.
Day 28
JavaScript Day 28
SOOPRO Pathshala Exercises
Day 28
1. Write a javascript progrm to use document.getElementById() method.
2. Write a JavaScript program to use document.getElementsByName() method.
Day 29
JavaScript Day 29
SOOPRO Pathshala Exercises
Day 29
1. Write a javascript progrm to use document.getElementsByClassName() method.
2. Write a JavaScript program to use document.getElementsByTagName() method.