An open API service indexing awesome lists of open source software.

https://github.com/walidalsafadi/javascript-programs

Several JavaScript programs for practice.
https://github.com/walidalsafadi/javascript-programs

all-substrings html javascript js prime-factors taylor-series

Last synced: 26 days ago
JSON representation

Several JavaScript programs for practice.

Awesome Lists containing this project

README

          

# JavaScript Programs
- Several JavaScript programs for practice.

### All Substrings

- JavaScript program that reads a word and prints all substrings, sorted by length.
- The program has a loop to let the user enter as many words as the user wants, and then the user can terminate the program by entering an empty string.

### Taylor Series
- JavaScript program that implements the Taylor series expansion of the function (1+x) for any x in the interval (-1,1], as given by:
(1+x)=x−x2/2+x3/3−x4/4+x5/5−....
- The program prompts the user to enter the number of terms n as well as the value of x, and then computes the approximation to (1 + x) using the first n terms of the preceding series. The program prints the approximate value.

### Prime Factors
- JavaScript program that asks the user for an integer n and then prints out all its prime factors.
- Please keep in mind that the program prints all prime factors, even if they are redundant.