Skip to content

Add if-else statement and ternary operator#8

Closed
AlioshaRabeshko wants to merge 6 commits into
masterfrom
if-condition
Closed

Add if-else statement and ternary operator#8
AlioshaRabeshko wants to merge 6 commits into
masterfrom
if-condition

Conversation

@AlioshaRabeshko

Copy link
Copy Markdown
Member

No description provided.

@AlioshaRabeshko AlioshaRabeshko changed the title If condition Add If else else-if conditions Oct 1, 2017
@AlioshaRabeshko AlioshaRabeshko changed the title Add If else else-if conditions Add If else else-if conditions and ternary operator Oct 2, 2017

@tshemsedinov tshemsedinov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Remove .eslintrc.yml from rull-request because of merge conflict
  • Use eslint before comit
  • After that you need to rebase with master, I'll help

Comment thread JavaScript/5-if-else.js Outdated
@@ -0,0 +1,45 @@
'use strict';


Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use single empty line to separate logical blocks

Comment thread JavaScript/5-if-else.js Outdated
}

if (condition2)
console.log('5 > 3');

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use {}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or remove \n to have single line condition

Comment thread JavaScript/5-if-else.js
}
// Good syntax
condition2 ? console.log('5 > 3') : console.log(false);
// Good syntax

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove line

@tshemsedinov tshemsedinov left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove lines and file .gitignore, everything else is ok

Comment thread JavaScript/5-if-else.js
const condition2 = 5 > 3; // Boolean true
const name = 'Ryu'; // String

// Good syntax

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove line

Comment thread JavaScript/5-if-else.js
if (condition1) {
console.log('5 < 3');
}
// Good syntax

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove line

@tshemsedinov tshemsedinov changed the title Add If else else-if conditions and ternary operator Add if-else statement and ternary operator Oct 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants