---
title: Introduction to Basic Algorithm Scripting
block: basic-algorithm-scripting
superBlock: javascript-algorithms-and-data-structures
---

## Introduction to Basic Algorithm Scripting

A computer algorithm is a sequence of steps that is followed to achieve a particular outcome. To write an algorithm, you must first understand a problem, and then solve it with coding.

To make solving problems easier, it can be helpful to break them down into many chunks. Then, each chunk can be solved one by one. For example, if you are building a calculator, don't try to solve the problem as a whole. First, consider how to get inputs. Then, determine each arithmetic operation one by one. Finally, display the results.

In this section we will learn to solve basic algorithm problems using JavaScript. This will help you improve your problem solving skills and prepare you to later solve more complex problems.

**Hint**: If you get stuck, try using `console.log()` to log variable values to the console. This will help to debug problems.
