The Startup
Published in

The Startup

JavaScript Best Practices — Comments and Spaces

Photo by Demi-Felicia Vares on Unsplash

JavaScript is an easy to learn programming language. It’s easy to write programs that run and does something. However, it’s hard to account for all the uses cases and write robust JavaScript code.

In this article, we’ll look at the best ways to work with comments and spaces.


Get smarter at building your thing. Follow to join The Startup’s +8 million monthly readers & +756K followers.

Recommended from Medium

Getting setup for WordPress Gutenberg accessibility testing

Class, Factory and Object Prototypes in JavaScript

UI Development with Chakra UI Vue — Badges

Visual Testing with CRA, Tailwind, Storybook, and Chromatic

React Tips — Form Validation

React Class Styles

Best of Modern JavaScript — WeakMaps and Sets

Getting started with template engine

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
John Au-Yeung

John Au-Yeung

Web developer. Subscribe to my email list now at Email me at

More from Medium

How to Make Numbers More Readable in Your JavaScript Code

3 ways to split and remove HTML from a string

Introduction to Javascript

JavaScript Coding Tutorial — Part 1

Have fun playing with different numbers and colors, and let your JavaScript app run for a while.