diff --git a/1-js/02-first-steps/14-function-basics/article.md b/1-js/02-first-steps/14-function-basics/article.md index e301d776..f23c8c01 100644 --- a/1-js/02-first-steps/14-function-basics/article.md +++ b/1-js/02-first-steps/14-function-basics/article.md @@ -332,9 +332,9 @@ return*!*;*/!* So, it effectively becomes an empty return. We should put the value on the same line instead. ```` -## Naming a function [#function-naming] +## Naming a function #function-naming -Functions are actions. So their name is usually a verb. It should briefly, but as accurately as possible, describe what the function does, so that someone reading the code gets an indication of what the function does. +Functions are actions. So their name is usually a verb. It should be brief, as accurate as possible and describe what the function does, so that someone reading the code gets an indication of what the function does. It is a widespread practice to start a function with a verbal prefix which vaguely describes the action. There must be an agreement within the team on the meaning of the prefixes. @@ -376,9 +376,9 @@ These examples assume common meanings of prefixes. What they mean for you is det ```smart header="Ultrashort function names" Functions that are used *very often* sometimes have ultrashort names. -For example, the [jQuery](http://jquery.com) framework defines a function `$`. The [LoDash](http://lodash.com/) library has its core function named `_`. +For example, the [jQuery](http://jquery.com) framework defines a function with `$`. The [LoDash](http://lodash.com/) library has its core function named `_`. -These are exceptions. Generally functions names should be concise, but descriptive. +These are exceptions. Generally functions names should be concise and descriptive. ``` ## Functions == Comments