Skip to content

Commit

Permalink
refactor(48-conditionals/60-ternary-operator): improve solution (#273)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhabinka committed Jul 2, 2020
1 parent 049cee7 commit 688863a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/48-conditionals/60-ternary-operator/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { reverse } from 'hexlet-basics/string';

// BEGIN
const convertText = (text) => {
const reversable = text.length > 0 && text[0] !== text[0].toUpperCase();
const reversable = text[0] !== text[0].toUpperCase();
return reversable ? reverse(text) : text;
};
// END
Expand Down

0 comments on commit 688863a

Please sign in to comment.