Skip to content

Instantly share code, notes, and snippets.

@oleg-agapov
Last active August 2, 2020 12:38
Show Gist options
  • Save oleg-agapov/a22fbf7e9d42afaa7e983b15879612e3 to your computer and use it in GitHub Desktop.
Save oleg-agapov/a22fbf7e9d42afaa7e983b15879612e3 to your computer and use it in GitHub Desktop.

Style guide

// bad
var func_dbl=function(n){return n*2}

var my_numbers=[1,2,3];

var d=my_numbers.map(func_dbl);
// good
const double (number) => {
  return 2 * n;
}

const myNumbers = [1, 2, 3];

const doubled = myNumbers.map(double);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment