Skip to content

Instantly share code, notes, and snippets.

@RubaXa
Last active July 28, 2022 08:45
Show Gist options
  • Save RubaXa/e7d1a9514787ac6b68d2 to your computer and use it in GitHub Desktop.
Save RubaXa/e7d1a9514787ac6b68d2 to your computer and use it in GitHub Desktop.
Multivar & Trailing comma vs. Diff
// 1. var
var name = 'name';
var i, length;
var j = 0;
// 2. var
var name = 'name';
var i;
var j = 0;
var length;
// ...
// 1. obj
var foo = {
num: 123,
str: '...',
};
// 2. obj
var bar = {
num: 123,
str: '...'
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment