<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq" -->

---
title: Writing Clean JavaScript — ES6 Edition | daily.dev
description: Clean code is not just code that works, but rather code that can be easily read, reused, and refactored by others. This article focuses on writing clean...
canonical: https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Writing Clean JavaScript — ES6 Edition | daily.dev
og:description: Clean code is not just code that works, but rather code that can be easily read, reused, and refactored by others. This article focuses on writing clean...
og:url: https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq
og:image: https://api.daily.dev/og/posts/dJK0JkTgQ.png
og:image:alt: Writing Clean JavaScript — ES6 Edition
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Writing Clean JavaScript — ES6 Edition

**[Geek Culture](https://daily.dev/sources/geekculture)** · 1 min read · 326 upvotes · 29 comments

## Summary

Clean code is not just code that works, but rather code that can be easily read, reused, and refactored by others. This article focuses on writing clean JavaScript ES6 code which is not framework-specific. Most of the mentioned examples can apply to almost any other programming language.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://medium.com/geekculture/writing-clean-javascript-es6-edition-834e83abc746>

## Community discussion

Top comments from developers on daily.dev.

**@mbrown** · 4 upvotes

> Great advice with excellent examples of Do's and Don'ts!

**@lhan08** · 1 upvotes

> nice! Also try the airbnb/javascript :)

**@fnavarijo** · 1 upvotes

> I really liked the article. Nice one!

**@yardan\_dev** · 1 upvotes

> this makes your code easy to read , i like this tips 😍

**@hamatoyogi** · 1 upvotes

> Great examples in this post 👏🏽

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 1 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#general-programming](https://daily.dev/tags/general-programming), [#javascript](https://daily.dev/tags/javascript)

[View this post on daily.dev](https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Writing Clean JavaScript — ES6 Edition","url":"https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq"},"datePublished":"2021-08-27T08:40:20.500Z","dateModified":"2021-10-07T14:17:10.317Z","description":"Clean code is not just code that works, but rather code that can be easily read, reused, and refactored by others. This article focuses on writing clean...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9e3fbba93388f73effb72b0cb1ce21b3","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9e3fbba93388f73effb72b0cb1ce21b3","isAccessibleForFree":true,"articleSection":"Geek Culture","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Geek Culture","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/9ed83f96af5243178a743739c98143c4","url":"https://daily.dev/sources/geekculture"},"commentCount":29,"discussionUrl":"https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":326},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":29}],"keywords":"general-programming,javascript","timeRequired":"PT1M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Geek Culture","item":"https://daily.dev/sources/geekculture"},{"@type":"ListItem","position":3,"name":"Writing Clean JavaScript — ES6 Edition"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/writing-clean-javascript-es6-edition-djk0jktgq","comment":[{"@type":"Comment","text":"Great advice with excellent examples of Do’s and Don’ts!","datePublished":"2021-08-27T13:25:48.991Z","url":"https://daily.dev/posts/dJK0JkTgQ#c-Me9wqdX7d","author":{"@type":"Person","name":"Matthew Brown","url":"https://daily.dev/mbrown","image":"https://lh3.googleusercontent.com/a-/AOh14GhyhPFbKibNt1plegs7izzDOlEQZCB_qGTcSyoaLdw=s100"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":4}},{"@type":"Comment","text":"nice! Also try the airbnb/javascript :)","datePublished":"2021-10-30T14:14:49.928Z","url":"https://daily.dev/posts/dJK0JkTgQ#c-f0wmDTi0e","author":{"@type":"Person","name":"LaaaaanN","url":"https://daily.dev/lhan08","image":"https://avatars.githubusercontent.com/u/14991331?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"I really liked the article. Nice one!","datePublished":"2021-08-28T00:33:17.097Z","dateModified":"2021-08-28T00:33:41.142Z","url":"https://daily.dev/posts/dJK0JkTgQ#c-qshfwEPzc","author":{"@type":"Person","name":"Fernando Navarijo","url":"https://daily.dev/fnavarijo","image":"https://avatars.githubusercontent.com/u/9476559?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"this makes your code easy to read , i like this tips 😍","datePublished":"2021-08-27T21:53:22.897Z","url":"https://daily.dev/posts/dJK0JkTgQ#c-PwJE6xqM-","author":{"@type":"Person","name":"Yardan","url":"https://daily.dev/yardan_dev","image":"https://media.daily.dev/image/upload/s--dIg5y8u1--/f_auto/v1708564305/avatars/avatar_pIwYvORdp"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}},{"@type":"Comment","text":"Great examples in this post 👏🏽","datePublished":"2021-08-30T06:34:31.827Z","url":"https://daily.dev/posts/dJK0JkTgQ#c-qOB9uSW-l","author":{"@type":"Person","name":"Yoav Ganbar","url":"https://daily.dev/hamatoyogi","image":"https://avatars0.githubusercontent.com/u/6682981?v=4"},"interactionStatistic":{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":1}}]}
```

