---
title: "Discussion on \"How you should not write code | JavaScript\" | Hashnode"
description: "Discussion on \"How you should not write code | JavaScript\". Write a better and clean code in JavaScript with small tips."
url: "https://hashnode.com/posts/how-you-should-not-write-code-or-javascript/6043adb65a56f82fa3ecbec6"
---

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

Discussion

# [How you should not write code | JavaScript](https://blog.decipher.dev/how-you-should-not-write-code-or-javascript?utm_source=hashnode&utm_medium=feed)

Write a better and clean code in JavaScript with small tips.

Mar 6, 2021 · 12 min read · blog.decipher.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#typescript](https://hashnode.com/tag/typescript)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)

## Written by

[Deepak Vishwakarma](https://hashnode.com/@decipher)

@decipher · Singapore

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

Programmer, Poet and Enthusiastic Tech lover

I am developer from south-east asia, Singapore. I have more than 10years of development experience. In my leisure time, I like to read and write poems. I am passionate about tech and coding.

## Responses 1

Markdown supported · ⌘↵ to post

[Chris Tanner](https://hashnode.com/@kraftman)

[Mar 8, 2021](https://hashnode.com/posts/how-you-should-not-write-code-or-javascript/6043adb65a56f82fa3ecbec6/comment/604645f673cc1742999bfbdc)

For #4 your 'break down' code is much easier than your concise reducer code. It has good comments, good variable names, etc. It's much easier to read. We aren't charged by lines of code, and the less complex code is the less chance of introducing bugs.

Private variable naming also costs nothing and may prevent bugs.

[Deepak Vishwakarma](https://hashnode.com/@decipher)

[Mar 8, 2021](https://hashnode.com/posts/how-you-should-not-write-code-or-javascript/6043adb65a56f82fa3ecbec6/comment/604645f673cc1742999bfbdc#reply-604667d3e2865f44bf965c71)

Thanks for your feedback. That I what I am trying to highlight. You can write similar code based on your needs. You don’t need to follow certain standards. For some, developer they like more concise code than well-structured code. I prefer the second part. Coz I love functional programming. So that is natural.

Regarding, the private variable I just highlighted. You may not need this now. With the help of a new private scope variable. Underscore will be going to obsolete. And more than it helps, it creates confusion. If you dont use it correctly.
