---
title: "Discussion on \"Difference between enum and const enum in Typescript\" | Hashnode"
description: "Discussion on \"Difference between enum and const enum in Typescript\". Enums are a powerful construct to reduce errors in your code. Instead of typing a string, and possibly mistyping the value, using an 'enum' lets the compiler throw you an error at compile time. It also helps in refactoring your code (the editor can f..."
url: "https://hashnode.com/posts/difference-between-enum-and-const-enum-in-typescript/61b4df58b055806a4b00e257"
---

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

Discussion

# [Difference between enum and const enum in Typescript](https://aliasger.dev/difference-between-enum-and-const-enum-in-typescript?utm_source=hashnode&utm_medium=feed)

Enums are a powerful construct to reduce errors in your code. Instead of typing a string, and possibly mistyping the value, using an 'enum' lets the compiler throw you an error at compile time. It also helps in refactoring your code (the editor can f...

Dec 11, 2021 · 2 min read · aliasger.dev  
Updated Dec 20, 2021  
Read the article

-   [#typescript](https://hashnode.com/tag/typescript)

## Written by

[Aliasger Jaffer](https://hashnode.com/@aliasger)

@aliasger · Toronto, Ontario

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

Senior Developer - .NET and Angular

I am a developer from Toronto, Canada and I enjoy writing about JavaScript, Angular and the .NET framework.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
