JavaScript Algorithms

JS Algos

What is a Javascript Algorithm?

JavaScript(JS) is a popular scripting language that is used to create interactive web pages. There is much more to JS, but, for the purpose of this site, I am going to stop right there. An algorithm is a set of instructions or steps that are executed in a certain order to accomplish a specific task. Thus, a JavaScript algorithm is a set of instructions written in JavaScript.

Why I made this site?

As a Frontend Developer, actually a brand new one, having a solid understanding of JavaScript is crucial. JS is the core programming language. There is no way to avoid it, plain and simple. However, it is not always easy to grasp. In fact, like all programming languages, the learning process is ongoing. And, the more you practice, the more you learn. The idea for this site was born out of weekly coding challenges hosted by the bootcamp that I was enrolled in. I started accompanying each challenge with a simple dashboard that would help me to learn, improve and visualize how the algorithm would work. Then, I started brainstorming about the functionality, aesthetics and accessibility of the dashboard. And then it was live!

How to Use this Site?

If you are reading this, you have already found the "info" button.


The landing page has a series of cards. Each card represents an algorithm. The level of difficulty is indicated by a battery icon in the lower left corner. A battery that is 3/4 full represents an easy algorithm. While a 1/2 full battery indicates an intermediate/medium difficulty. A 1/4 full and an empty battery represent hard and advanced; respectively. As of now, I have only implemented easy and medium algorithms. Each card has a "play" button in the lower right corner that opens an interactive dashboard.

sample card image


Each dashboard has a home button, a simple instruction, user input fields, and a button to run the algorithm. The inputs automatically reset 2.5 - 5 seconds after the algorithm runs. On the right side of the dashboard, in the desktop view, a pdf file of the algorithm is displayed. At the bottom of the pdf, there is a button that will download the pdf file. In the mobile view, the pdf file is note displayed.

sample dashboard image



Is there only one instance of each letter in your word?


Is your word/s a palindrome?


Are there two numbers whose sum is the target number?


See what happens when you decide which words will be reversed.


Find out which word is the longest and its length.


Get the factorial(!n) of a positive integer.


Check to see if a number is a palidrome.


Reverse an integer and maintain it's relation to 0.


Get the longest unique substring and its length.


Reverse the order of words in a string


Get the sum of two numbers and of the number between them.


Convert a Roman Numeral to an integer or vice versa.

Is it an isogram?

Enter a word or sentence to see if it's a palindrome.

Any two numbers in your array equal your target number.

Spin words that are longer than or equal to your number.

Longest word in your sentence?

Enter a positive integer.

Palindrome Number?

Reverse an integer.

Find the longest non-repeating substring.

Reverse word/s in a string.

Enter two numbers to sum their range.

Number to Roman or Roman to Number.