task Variables-and-Operators#17
Open
mohamedali0122 wants to merge 2 commits into
Open
Conversation
| const exp6 = null == undefined; // TODO: ADD YOUR EVALUATION HERE -->true | ||
|
|
||
| const exp7 = "true" == true; // TODO: ADD YOUR EVALUATION HERE --> | ||
| const exp7 = "true" == true; // TODO: ADD YOUR EVALUATION HERE -->true |
There was a problem hiding this comment.
"true" is a string value and true is a boolean value, they do not equal the same thing, therefore this should evaluate to false
| const exp7 = "true" == true; // TODO: ADD YOUR EVALUATION HERE -->true | ||
|
|
||
| const exp8 = "false" == false; // TODO: ADD YOUR EVALUATION HERE --> | ||
| const exp8 = "false" == false; // TODO: ADD YOUR EVALUATION HERE -->true |
There was a problem hiding this comment.
Same goes here, they're two different types, this should be false.
|
|
||
| // - Check if num is even and greater than 10 using the logical AND operator. Log the result to the console. | ||
| // TODO: ADD YOUR CODE BELOW | ||
| console.log(num / 2 == 0 && num > 10); |
There was a problem hiding this comment.
Use the mod operator % to check for the remainder instead of the division operator /.
|
|
||
| // - Check if num is divisible by both 3 and 5 using the logical OR operator. Log the result to the console. | ||
| // TODO: ADD YOUR CODE BELOW | ||
| console.log(num / 3 ==0 || num / 5 == 0 ) |
There was a problem hiding this comment.
The division operator / will only return the result, not the remainder, here we're supposed to check if the number is divisible using the mod operator % and then comparing the remainder.
| // - Check if num is either negative or odd using the logical OR operator. Log the result to the console. | ||
| // TODO: ADD YOUR CODE BELOW | ||
|
|
||
| console.log(num /2 == 1 || num < 0) |
There was a problem hiding this comment.
Use the mod operator % to check for the remainder instead of the division operator /.
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.
hay my task is done