---
title: "Discussion on \"JavaScript try...catch\" | Hashnode"
description: "Discussion on \"JavaScript try...catch\". Try catch confused me for a long time, both how you use it and why you use it. Let's start with how.\nIt's like if else, but not\nIf you were to write try catch as an if else, it would look like this:\nif(it works) {\n  do something\n} else {\n  show an er..."
url: "https://hashnode.com/posts/javascript-trycatch/60a8ca3d5379f65d10b5f0c5"
---

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

Discussion

# [JavaScript try...catch](https://blog.nicm42.me.uk/javascript-trycatch?utm_source=hashnode&utm_medium=feed)

Try catch confused me for a long time, both how you use it and why you use it. Let's start with how. It's like if else, but not If you were to write try catch as an if else, it would look like this: if(it works) { do something } else { show an er...

May 22, 2021 · 2 min read · blog.nicm42.me.uk  
Read the article

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

## Written by

[Nic](https://hashnode.com/@nicm42)

@nicm42 · England

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

This week I learnt...

Front End Developer. I like problem solving and making things pretty. I also like red.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
