---
title: "Discussion on \"The Safe Assignment Operator (?=) in JavaScript — No More try-catch\" | Hashnode"
description: "Discussion on \"The Safe Assignment Operator (?=) in JavaScript — No More try-catch\". How the TC39 Safe Assignment Operator (?=) brings Go-style error handling to JavaScript. Flat, explicit, no nesting — plus a polyfill you can use today."
url: "https://hashnode.com/posts/javascript-safe-assignment-operator/6994bef2ba9dcc61b36fc3b9"
---

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

Discussion

# [The Safe Assignment Operator (?=) in JavaScript — No More try-catch](https://estebanrfp.com/javascript-safe-assignment-operator?utm_source=hashnode&utm_medium=feed)

How the TC39 Safe Assignment Operator (?=) brings Go-style error handling to JavaScript. Flat, explicit, no nesting — plus a polyfill you can use today.

Feb 17 · 4 min read · estebanrfp.com  
Read the article

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

## Written by

[Esteban Fuster Pozzi (estebanrfp)](https://hashnode.com/@estebanrfp)

@estebanrfp · Valencia, España

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

Full Stack Developer - dWEB R&D

Full Stack Developer - dWEB R&amp;D

## Responses 2

Markdown supported · ⌘↵ to post

[Tiffany Spark](https://hashnode.com/@markupandmatcha)

[Feb 17](https://hashnode.com/posts/javascript-safe-assignment-operator/6994bef2ba9dcc61b36fc3b9/comment/6994f1a1e2a1742da7f60a7c)

the try-catch pyramid of doom is genuinely something i dread every time i have to work in a codebase that handles a lot of async stuff. the Go-style destructuring feels way cleaner once you see it side by side. will be watching the TC39 proposal closely, fingers crossed it moves fast.

[Tiffany Spark](https://hashnode.com/@markupandmatcha)

[Feb 17](https://hashnode.com/posts/javascript-safe-assignment-operator/6994bef2ba9dcc61b36fc3b9/comment/6994e26e8fa83f882e19fd14)

the nested try-catch pyramid of doom is so real — i've seen files where the actual logic is buried under four levels of error handling and it becomes completely unreadable. this proposal looks genuinely useful, love that it follows the go-style \[error, value\] pattern. bookmarking to keep an eye on the TC39 progress, hopefully it ships without too many caveats
