# Stack Trace

*noun*

say it: **“STAK trayss”** **/stæk treɪs/**

The lines under an error message that list the functions that were running when it happened, newest first, with their file names and line numbers.

## What is **Stack Trace** in JavaScript?

**Stack Trace** — The lines under an error message that list the functions that were running when it happened, the newest first, each with its file, line and column. Start with the top line that points into your own file. In code, it's the error's `stack` property.

```text
Error: Servings must be at least 1
    at scaleRecipe (C:\recipes\scale.js:2:9)
    at Object.<anonymous> (C:\recipes\scale.js:4:1)
```

## In a sentence

- “The **stack trace** pointed to scale.js line 12, inside scaleRecipe, which main.js had called on line 4.”

Level: Apprentice · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=2)

Updated: November 9, 2026

## In other subjects

- [Stack Trace in C#](https://www.ask-codey.com/glossary/stack-trace-c-sharp)
- [Stack Trace in Java](https://www.ask-codey.com/glossary/stack-trace)

Source: https://www.ask-codey.com/glossary/stack-trace-javascript
