---
title: "Discussion on \"Are you using Trailing Commas in your JavaScript?\" | Hashnode"
description: "Discussion on \"Are you using Trailing Commas in your JavaScript?\". I am presuming that you are using objects and arrays every day in your JavaScript. \nAnd I am also sure that most of them are not single line these arrays and objects with items spread in many lines.\nThough my question here is:\n\nDo you leave a trailin..."
url: "https://hashnode.com/posts/are-you-using-trailing-commas-in-your-javascript/5f4f6ad5c0ee3d260ba903af"
---

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

Discussion

# [Are you using Trailing Commas in your JavaScript?](https://blog.pankaj.pro/are-you-using-trailing-commas-in-your-javascript?utm_source=hashnode&utm_medium=feed)

I am presuming that you are using objects and arrays every day in your JavaScript. And I am also sure that most of them are not single line these arrays and objects with items spread in many lines. Though my question here is: Do you leave a trailin...

Sep 2, 2020 · 3 min read · blog.pankaj.pro  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#git](https://hashnode.com/tag/git)
-   [#code-review](https://hashnode.com/tag/code-review)
-   [#productivity](https://hashnode.com/tag/productivity)
-   [#2articles1week](https://hashnode.com/tag/2articles1week)

## Written by

[Pankaj Patel](https://hashnode.com/@pankajpatel)

@pankajpatel · Berlin

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

Blog, Tech, Photography etc.

I am developer from India currently based in Berlin, Germany. I am very interested in Design, though I don't design 😉 I take care of it while making my apps. Photography, videography and having random conversation over beer are my activities of spare time. Timelapses and hyperlapses make me wonder all the time 😊

## Responses 2

Markdown supported · ⌘↵ to post

[Skay](https://hashnode.com/@skay)

[Sep 2, 2020](https://hashnode.com/posts/are-you-using-trailing-commas-in-your-javascript/5f4f6ad5c0ee3d260ba903af/comment/5f4fae75a71a722802ba5b2d)

Thanks for this article Pankaj! While I saw prettier add it by default, I did not know that reason. Your article explained it quiet well. Good job!!

[Pankaj Patel](https://hashnode.com/@pankajpatel)

[Sep 2, 2020](https://hashnode.com/posts/are-you-using-trailing-commas-in-your-javascript/5f4f6ad5c0ee3d260ba903af/comment/5f4fae75a71a722802ba5b2d#reply-5f4fba03c48c6b29cd2eca69)

Thanks [Skay](https://hashnode.com/@skay)

[Tapas Adhikary](https://hashnode.com/@atapas)

[Sep 2, 2020](https://hashnode.com/posts/are-you-using-trailing-commas-in-your-javascript/5f4f6ad5c0ee3d260ba903af/comment/5f4f96fda71a722802ba599b)

Good one [Pankaj Patel](https://hashnode.com/@pankajpatel)!

I used to find them annoying and with the feeling of doing something wrong initially.. Now I got used to it. Many of the starter projects(say, with gatsby) use the style heavily.. I do not see any issues now in using it.

Thanks for sharing.

[Pankaj Patel](https://hashnode.com/@pankajpatel)

[Sep 2, 2020](https://hashnode.com/posts/are-you-using-trailing-commas-in-your-javascript/5f4f6ad5c0ee3d260ba903af/comment/5f4f96fda71a722802ba599b#reply-5f4f9779a71a722802ba59a5)

Thanks [Tapas Adhikary](https://hashnode.com/@atapas)

I agree, it just takes few days to get used to and helps a lot while working in a team.
