Last update:   17-01-2022

Short code

Make the code as short as possible! A developer who comes across this line and tries to understand what is the value of will come to you, seeking for an answer.
// taken from a well-known javascript library

i = i ? i < 0 ? Math.max(0, len + i) : i : 0;


Use single-letter variable names everywhere! No one will be able to find it using “search”. A real ninja will never use i as the counter in a "for" loop. Look around, there are many more exotic letters. For instance, x or y.


The team rules forbid the use of one-letter and vague names. Then shorten them, make abbreviations! Only the one with truly good intuition will be able to understand such names.
let lst; // list
let ua;  // userAgent
let brsr; // broweser


While choosing a name try to use the most abstract word. The ideal name for a variable is data! Use it everywhere you can.


Use same names for variables inside and outside a function! No efforts to invent new names.
let user = authenticateUser();
function render() {
  let user = anotherValue();
      // a programmer wants to work with user here and...


        A B C D E F