Open
Conversation
Auenc
reviewed
Dec 17, 2021
|
|
||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (num >= lower && num <= upper) { |
Contributor
There was a problem hiding this comment.
This could be simplified to
return num >= lower && num <= upper
Author
There was a problem hiding this comment.
I have learnt about this just this morning, Definitely something I will try to implement in the next exercises
Auenc
reviewed
Dec 17, 2021
|
|
||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (val1 === 'Hello' || val1 === 'Goodbye') { |
Contributor
There was a problem hiding this comment.
Same as above, the if statement isn't needed here. You can just return val1 === 'Hello' || val1 === 'Goodbye'
Auenc
reviewed
Dec 17, 2021
|
|
||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (array.length === 0) { |
Auenc
reviewed
Dec 17, 2021
|
|
||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (num1 > num2) { |
Auenc
reviewed
Dec 17, 2021
|
|
||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| return Math.min(...nums) |
Contributor
There was a problem hiding this comment.
Great use of the Math library, and the array spread syntax!
Auenc
reviewed
Dec 17, 2021
| function isHello(val1) { | ||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (val1 === "Hello") { |
Auenc
reviewed
Dec 17, 2021
| function isNotHello(val1) { | ||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (val1 !== "Hello") { |
Auenc
reviewed
Dec 17, 2021
| function isLongerThan(val1, val2) { | ||
| // TODO: write code in this function body to pass the tests | ||
|
|
||
| if (val1.length > val2.length) { |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.