diff --git a/JavaScript/Javascript.md b/JavaScript/Javascript.md index 546a554..2695a1e 100644 --- a/JavaScript/Javascript.md +++ b/JavaScript/Javascript.md @@ -1730,37 +1730,22 @@ Heavily inspired by and partly composed of [Airbnb JavaScript Style Guide // bad if (foo === 123 && - bar === 'abc') { - thing1(); - } - - // bad - if (foo === 123 - && bar === 'abc') { - thing1(); - } - - // bad - if ( - foo === 123 && - bar === 'abc' + bar === 'abc' ) { thing1(); } // good - if ( - foo === 123 - && bar === 'abc' + if (foo === 123 + && bar === 'abc' ) { thing1(); } // good - if ( - (foo === 123 || bar === 'abc') - && doesItLookGoodWhenItBecomesThatLong() - && isThisReallyHappening() + if ((foo === 123 || bar === 'abc') + && doesItLookGoodWhenItBecomesThatLong() + && isThisReallyHappening() ) { thing1(); }