---
title: "Discussion on \"Enums in TypeScript\" | Hashnode"
description: "Discussion on \"Enums in TypeScript\". For having different types of values associated with variable we can use an object and have keys attached to our requirement.\nconst MatchResult = {\n    HomeWin: 'H';\n    AwayWin : 'A';\n    Draw : 'D';\n}\n// OR WE CAN DO THIS\n\nconst homeWin = 'H';\ncons..."
url: "https://hashnode.com/posts/enums-in-typescript/6563a5ac13d261b2d6b9a9f9"
---

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

Discussion

# [Enums in TypeScript](https://siddhantsiddh15.hashnode.dev/enums-in-typescript?utm_source=hashnode&utm_medium=feed)

For having different types of values associated with variable we can use an object and have keys attached to our requirement. const MatchResult = { HomeWin: 'H'; AwayWin : 'A'; Draw : 'D'; } // OR WE CAN DO THIS const homeWin = 'H'; cons...

Nov 26, 2023 · 2 min read · siddhantsiddh15.hashnode.dev  
Updated Dec 6, 2023  
Read the article

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

## Written by

[Siddhant](https://hashnode.com/@siddhantsiddh15)

@siddhantsiddh15 · India

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

Learning everyday to be a better programmer

I am a developer from India. I like exploring new technologies to understand how engineering works. I have interest in React, Redux, NodeJS, JavaScript and I share my learnings one blog at a time which can be useful for any normal reader.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
