Skip to content

Instantly share code, notes, and snippets.

@anjanaraveendra
Created October 18, 2015 14:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anjanaraveendra/de594ada5e9c990f6ad9 to your computer and use it in GitHub Desktop.
Save anjanaraveendra/de594ada5e9c990f6ad9 to your computer and use it in GitHub Desktop.
1. Write a JS program to check given number is perfect number or not.
2. Write a JS program to check given number is Armstrong number or not.
3. Write a JS program to check given number is prime number or not.
4. Write a JS program to check given number is strong number or not.
5. JS program to check a number is odd or even.
6. Write a JS program to check given number is palindrome number or not.
8. Write a JS program to check given string is palindrome number or not.
7. Write a JS program to solve quadratiJS equation.
8. Write a JS program to print Fibonacci series of given range.
9. Write a JS program to get factorial of given number.
10. Write a JS program for Floyd’s triangle.
11. Write a JS program to print Pascal triangle.
12. Write a JS program to generate multiplication table.
13. Write a JS program to print ASCII value of all characters.
14. JS program to print hello world without using semicolon
15. Write a JS program which produces its own source code as its output
JS program with numbers
1. Write a JS program to reverse any number.
2. Write a JS program to find out sum of digit of given number.
3. Write a JS program to find out power of number.
4. Write a JS program to add two numbers without using addition operator.
5. Write a JS program to subtract two numbers without using subtraction operator.
6. Write a JS program to find largest among three numbers using binary minus operator.
7. Write a JS program to find largest among three numbers using conditional operator
8. Write a JS program to find out generic root of any number.
9. Write a JS program to find out prime factor of given number.
10. Write a JS program to find out NCR factor of given number.
11. How to convert string to int without using library functions in JS
12. Program in JS to print 1 to 100 without using loop
13. JS program for swapping of two numbers
14. Program to find largest of n numbers in JS
15. Split number into digits in JS programming
16. JS program to count number of digits in a number
Recursion
Example of recursion in JS programming
L.C.M and H.C.F.
1. Write a JS program to find out L.C.M. of two numbers.
2. Write a JS program to find out H.C.F. of two numbers.
3. Write a JS program to find out G.C.D. of two numbers.
Swapping
1. Write a JS program to swap two numbers.
2. Write a JS program to swap two numbers without using third variable.
3. Write a JS program for swapping of two arrays.
4. Write a JS program for swapping of two string.
Conversion ( Number System )
1. Write a JS program to convert decimal number to binary number.
2. Write a JS program to convert decimal number to octal number.
3. Write a JS program to convert decimal number to hexadecimal number.
4. Write a JS program to convert octal number to binary number.
5. Write a JS program to convert octal number to decimal number.
6. Write a JS program to convert octal number to hexadecimal number.
7. Write a JS program to convert hexadecimal number to binary number.
8. Write a JS program to convert hexadecimal number to octal number.
9. Write a JS program to convert hexadecimal number to decimal number.
10. Write a JS program to convert binary number to octal number.
11. Write a JS program to convert binary number to decimal number.
12. Write a JS program to convert binary number to hexadecimal number.
13. JS program for addition of binary numbers .
14. JS program for multiplication of two binary numbers.
15. JS program fractional binary conversion from decimal.
16. JS program for fractional decimal to binary fraction conversion.
17. JS program to convert decimal number to roman.
18. JS program to convert roman number to decimal number.
19. JS program to convert each digits of a number in words
20. JS program to convert currency or number in word.
Conversion ( Unit )
1. JS program for unit conversion.
String
1. Write a JS program to convert the string from upper case to lower case.
2. Write a JS program to convert the string from lower case to upper case.
3. Write a JS program to delete the all consonants from given string.
4. Write a JS program to count the different types of characters in given string.
5. Write a JS program to sort the characters of a string.
6. Write a JS program for concatenation two strings without using string.h header file.
7. Write a JS program to find the length of a string using pointer.
8. Write a JS program which prints initial of any name.
9. Write a JS program to print the string from given character.
10. Write a JS program to reverse a string
11. Reverse a string using recursion in JS
12. String concatenation in JS without using strcat
13. How to compare two strings in JS without using strcmp
14. String copy without using strcpy in JS
15. Convert a string to ASCII in JS
Matrix
1. Write a JS program for addition of two matrices.
2. Write a JS program for subtraction of two matrices
3. Write a JS program for multiplication of two matrices.
4. Write a JS program to find out sum of diagonal element of a matrix.
5. Write a JS program to find out transport of a matrix.
6. Write a JS program for scalar multiplication of matrix.
7. JS program to find inverse of a matrix
8. Lower triangular matrix in JS
9. Upper triangular matrix in JS
10. Strassen's matrix multiplication program in JS
11. JS program to find determinant of a matrix
File
1. Write a JS program to open a file and write some text and close its.
2. Write a JS program to delete a file.
3. Write a JS program to copy a file from one location to other location.
4. Write a JS program to copy a data of file to other file.
5. Write a JS program which display source code as a output.
6. Write a JS program which writes string in the file.
7. Write a JS program which reads string from file.
8. Write a JS program which writes array in the file.
9. Write a JS program which concatenate two file and write it third file.
10. Write a JS program to find out size of any file.
11. Write a JS program to know type of file.
12. Write a JS program to know permission of any file.
13. Write a JS program to know last date of modification of any file.
14. Write a JS program to find size and drive of any file.
Complex number
1. Complex numbers program in JS
2. Write a JS program for addition and subtraction of two complex numbers.
3. Write a JS program for multiplication of two complex numbers.
4. Write a JS program for division two complex numbers.
Series
1. Write a JS program to find out the sum of series 1 + 2 + …. + n.
2. Write a JS program to find out the sum of series 1^2 + 2^2 + …. + n^2.
3. Write a JS program to find out the sum of series 1^3 + 2^3 + …. + n^3.
4. Write a JS program to find out the sum of given A.P.
5. Write a JS program to find out the sum of given G.P.
6. Write a JS program to find out the sum of given H.P.
7. Write a JS program to find out the sum of series 1 + 2 + 4 + 8 … to infinity.
Array
1. Write a JS program to find out largest element of an array.
2. Write a JS program to find out second largest element of an unsorted array.
3. Write a JS program to find out second smallest element of an unsorted array.
4. Write a JS program which deletes the duplicate element of an array.
5. Write a JS program for delete an element at desired position in an array.
6. Write a JS program for insert an element at desired position in an array.
7. JS program to find largest and smallest number in an array
Sorting
1. Write a JS program for bubble sort.
2. Write a JS program for insertion sort.
3. Write a JS program for selection sort.
4. Write a JS program for quick sort.
5. Write a JS program for heap sort.
6. Write a JS program for merge sort.
7. Write a JS program for shell sort.
Recursion
1. Write a JS program to find factorial of a number using recursion.
2. Write a JS program to find GCD of a two numbers using recursion.
3. Write a JS program to find out sum digits of a number using recursion.
4. Write a JS program to find power of a number using function recursion.
5. Write a JS program to reverse any number using recursion.
Size of data type
1. Write a JS program to find the size of int without using sizeof operator.
2. Write a JS program to find the size of double without using sizeof operator.
3. Write a JS program to find the size of structure without using sizeof operator.
4. Write a JS program to find the size of union without using sizeof operator.
Using pointer
1. Write a JS program for concatenation two string using pointer.
Searching
1. Write a JS program for linear search.
2. Write a JS program for binary search.
3. Write a JS program for binary search using recursion.
Area and volume
1. Write a JS program to find the area of circle.
2. Write a JS program to find the area of any triangle.
3. Write a JS program to find the area of equilateral triangle.
4. Write a JS program to find the area of right angled triangle.
5. Write a JS program to find the area of rectangle.
6. Write a JS program to find the area of trapezium.
7. Write a JS program to find the area of rhombus.
8. Write a JS program to find the area of parallelogram.
9. Write a JS program to find the volume and surface area of cube.
10. Write a JS program to find the volume and surface area of cuboids.
11. Write a JS program to find the volume and surface area of cylinder.
12. Write a JS program to find the surface area and volume of a cone.
13. Write a JS program to find the volume and surface area of sphere.
14. Write a JS program to find the perimeter of a circle, rectangle and triangle.
JS program with very large numbers
1. Write a JS program to find factorial of 100 or very large numbers
2. Write a JS program to multiply the two very large number (larger the long int)
3. Write a JS program for division of large number (larger than long int)
4. JS code for modular division of large number.
5. JS code for division of large number.
6. JS code for power of large numbers.
Other
1. JS program for ATM transaction.
2. Write a JS program which passes one dimension array to function.
3. Write a JS program which passes two dimension array to function.
4. Write a JS program which takes password from user.
5. Write a scanf function in JS which accept sentence from user.
6. Write a scanf function in JS which accept paragraph from user.
7. Write a JS program to print the all prime numbers between 1 to 300.
8. Write a JS program which passes structure to function.
9. Palindrome in JS without using string function
10. How to get the ASCII value of a character in JS
11. JS program to get last two digits of year
12. JS program without main function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment