You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.