---
title: "Discussion on \"TypeError vs ReferenceError in JavaScript\" | Hashnode"
description: "Discussion on \"TypeError vs ReferenceError in JavaScript\". TypeError\nType error occurs when the operation you are trying to perform does not suit the variable’s data type. For Example, you can’t make integers uppercase:\n\nIn the above example, we have declared the variable num as a number data type. Attemptin..."
url: "https://hashnode.com/posts/typeerror-vs-referenceerror-in-javascript/63edbcfccc5f42e903acc256"
---

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

Discussion

# [TypeError vs ReferenceError in JavaScript](https://sarathwrites.hashnode.dev/typeerror-vs-referenceerror-in-javascript?utm_source=hashnode&utm_medium=feed)

TypeError Type error occurs when the operation you are trying to perform does not suit the variable’s data type. For Example, you can’t make integers uppercase: In the above example, we have declared the variable num as a number data type. Attemptin...

Feb 16, 2023 · 1 min read · sarathwrites.hashnode.dev  
Read the article

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

## Written by

[Sarathkumar](https://hashnode.com/@SarathWrites)

@SarathWrites

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

learningByDoing

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
