Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Но почему 2 пробела, а не 4
function sum(a, b) {}
var sum = function (a, b) {};
var sum = function(a, b) {
};
function foo() {
...
for (var i=0; i<a.length; i++) {
console.log(a[i]);
}
for (var i=0; i<b.length; i++) {
console.log(b[i]);
}
}
Используйте как в примере: Google, npm, Node
var thisIsObject = new Date;
N.b.: Using only spaces, and not mixing spaces with tabs, helps to avoid problems with diffs, patches, history, and annotations. The use of spaces also makes it easy to insert fine-grained sub-indentation for inter-line alignment.
This helps to avoid problems with diffs, patches, SVN history and annotations.
Оформление кода, оптимизация процесса проверки качества кода