Back to Developer Roadmap

Logical Error

src/data/question-groups/javascript/content/logical-error.md

4.0376 B
Original Source

A logical error is when your code runs without syntax or reference errors. But when it runs, it won't do what you want it to because of a mistake in how you wrote it.

Suppose you're trying to add two numbers together in a function. But instead of using the plus sign, you use the multiplication sign by mistake. The code will still run, but you won't get your desired answer.