---
title: "Discussion on \"Bulletproof type checks in JavaScript\" | Hashnode"
description: "Discussion on \"Bulletproof type checks in JavaScript\". Using typeof\nTo check what type is a variable you would most likely use the typeof function. You can even skip the parenthesis (typeof someVariable is same as typeof(someVariable)).\ntypeof works great for:\n\nstrings\nnumbers (not if checking integer vs..."
url: "https://hashnode.com/posts/bulletproof-type-checks-in-javascript/60a2e0c8eeabf031a1a954e5"
---

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

Discussion

# [Bulletproof type checks in JavaScript](https://danielcobo.com/bulletproof-type-checks-in-javascript?utm_source=hashnode&utm_medium=feed)

Using typeof To check what type is a variable you would most likely use the typeof function. You can even skip the parenthesis (typeof someVariable is same as typeof(someVariable)). typeof works great for: strings numbers (not if checking integer vs...

May 17, 2021 · 3 min read · danielcobo.com  
Read the article

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

## Written by

[Daniel Cobo](https://hashnode.com/@cobo)

@cobo

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

👨‍💻 Full-stack developer |🍦Vanilla code advocate

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
