UPPERCASE with _ is pretty much the standard for hard-coded Constants in JavaScript

  1. JavasScript.info says:
// bad
const PRIVATE_VARIABLE = 'should not be unnecessarily uppercased within a file';

// bad
export const THING_TO_BE_CHANGED = 'should obviously not be uppercased';

// bad
export let REASSIGNABLE_VARIABLE = 'do not use let with uppercase variables';

// ---

// allowed but does not supply semantic value
export const apiKey = 'SOMEKEY';

// better in most cases
export const API_KEY = 'SOMEKEY';

// ---

// bad - unnecessarily uppercases key while adding no semantic value
export const MAPPING = {
KEY: 'value'
};

// good
export const MAPPING = {
key: 'value'
};

--

--

--

I love learning

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

🔥State of Software Development 2020 — Weekly Picks #120

GraphQL Tutorial: How to Build an App in PHP

Lazy Loading in Angular 12

Becoming a frontend developer from now to a year Day 1.

ACF and Guttenberg Blocks

Great articles & Exciting news from Kt. Academy ⭐️

Javascript: The Call Stack and Heap

Todo App with React and Redux

React Redux to do list

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
Akshay Jain

Akshay Jain

I love learning

More from Medium

how event loops work in javascript.

Pair Programming

What is the difference between ‘==’ and ‘===’? And why you need to know.

What Applications You Cn Do With Javascript