Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // less complex alignment
- function foo() {
- var someVar = 1, // Some var
- anotherVariable = 2, // Another var
- isThing = someVar === anotherVariable; // Is thing?
- if (someVar === otherVar) bar(); // If we're otherVar
- else if (isThing) otherFn(); // Do awesome stuff
- else quux(); // Do bad stuff!!
- function bar() {
- if (anotherVariable === 42) { // Across block levels
- anotherFunction(); // it still breaks
- }
- }
- }
- // Much more complex everything aligned
- function foo() {
- var someVar = 1, // Some var
- anotherVariable = 2, // Another var
- isThing = someVar === anotherVariable; // Is thing?
- if (someVar === otherVar) bar(); // If we're otherVar
- else if (isThing) otherFn(); // Do awesome stuff
- else quux(); // Do bad stuff!!
- function bar() {
- if (anotherVariable === 42) { // Across block levels
- anotherFunction(); // it still breaks
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement