---
title: "Discussion on \"What is the difference between a statement and an expression in JavaScript?\" | Hashnode"
description: "Discussion on \"What is the difference between a statement and an expression in JavaScript?\". What is the main difference between if...else and ternary operator?"
url: "https://hashnode.com/posts/what-is-the-difference-between-a-statement-and-an-expression-in-javascript/661f3b2bbb275fe540030dd4"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is the difference between a statement and an expression in JavaScript?](https://kumarshivesh1.hashnode.dev/what-is-the-difference-between-a-statement-and-an-expression-in-javascript?utm_source=hashnode&utm_medium=feed)

What is the main difference between if...else and ternary operator?

Apr 17, 2024 · 5 min read · kumarshivesh1.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#wemakedevs](https://hashnode.com/tag/wemakedevs)

## Written by

[Kumar Shivesh](https://hashnode.com/@kumarshivesh)

@kumarshivesh

  
[View profile](https://hashnode.com/@kumarshivesh)

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
