Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fix typo * (48-conditionals/30-if) refactoring exercise according to python * (50-loops/10-while) remove "usage examples" heading * (50-loops/25-iteration-over-string) fix function name * (50-loops/30-syntax-sugar) remove "usage examples" heading * (50-loops/50-mutators) remove "usage examples" heading * (50-loops/55-return-from-loops) remove game of thrones
- Loading branch information
Showing
11 changed files
with
35 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
// BEGIN | ||
const getSentenceTone = (sentence) => { | ||
if (sentence.toUpperCase() === sentence) { | ||
return 'scream'; | ||
const guessNumber = (guess) => { | ||
if (guess === 42) { | ||
return 'You win!'; | ||
} | ||
return 'general'; | ||
|
||
return 'Try again!'; | ||
}; | ||
// END | ||
|
||
export default getSentenceTone; | ||
export default guessNumber; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
/* eslint operator-assignment: 0 */ | ||
|
||
// BEGIN | ||
const printReversedNameBySymbol = (name) => { | ||
let i = name.length - 1; | ||
const printReversedWordBySymbol = (word) => { | ||
let i = word.length - 1; | ||
while (i >= 0) { | ||
console.log(name[i]); | ||
console.log(word[i]); | ||
i = i - 1; | ||
} | ||
}; | ||
// END | ||
|
||
export default printReversedNameBySymbol; | ||
export default printReversedWordBySymbol; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters