Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add if-else statement and ternary operator #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from

Conversation

AlioshaRabeshko
Copy link
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
Copy link
Member

@tshemsedinov tshemsedinov left a comment

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

@@ -0,0 +1,45 @@
'use strict';


Copy link
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

}

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

Choose a reason for hiding this comment

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

Use {}

Copy link
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

}
// Good syntax
condition2 ? console.log('5 > 3') : console.log(false);
// Good syntax
Copy link
Member

Choose a reason for hiding this comment

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

Remove line

Copy link
Member

@tshemsedinov tshemsedinov left a comment

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

const condition2 = 5 > 3; // Boolean true
const name = 'Ryu'; // String

// Good syntax
Copy link
Member

Choose a reason for hiding this comment

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

Remove line

if (condition1) {
console.log('5 < 3');
}
// Good syntax
Copy link
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