Back to home

Verb examplesFirst noun examplesPrepositionsSecond noun examplesIn usage
JavaScript Naming Conventions main image

JavaScript Naming Conventions

1 [verb = required][verb = null][noun = null][preposition = null][noun = null]

Verb examples

  • get
  • save
  • fetch
  • throw
  • remove

First noun examples

  • user
  • image
  • data
  • item

Prepositions

  • from
  • to

Second noun examples

  • database
  • table
  • copy

In usage

The [noun][preoposition][noun] may not always need to be used and simplicity is the goal if possible.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 // high specificity examples [verb][noun][preposition][noun] getUserFromDatabase(); saveUserToDatabase(); saveImageToTable(); fetchRestaurantFromCopy(); // omitting the preposition and second noun [verb][noun] removeItem(); getResult(); // omitting all except verb [verb] signIn(); signOut(); signUp(); // using the first verb [verb][verb] confirmSignIn(); confirmSignUp();

Dennis O'Keeffe

@dennisokeeffe92
  • Melbourne, Australia

Hi, I am a professional Software Engineer. Formerly of Culture Amp, UsabilityHub, Present Company and NightGuru.
I am currently working on workingoutloud.dev, Den Dribbles and LandPad .

Related articles


1,200+ PEOPLE ALREADY JOINED ❤️️

Get fresh posts + news direct to your inbox.

No spam. We only send you relevant content.