This repository was archived by the owner on May 14, 2024. It is now read-only.
Hani's homework of javascript-week1#211
Closed
HaniBadran wants to merge 3 commits intoHackYourFuture:masterfrom
Closed
Hani's homework of javascript-week1#211HaniBadran wants to merge 3 commits intoHackYourFuture:masterfrom
HaniBadran wants to merge 3 commits intoHackYourFuture:masterfrom
Conversation
marcianoviereck
suggested changes
Dec 5, 2019
Contributor
marcianoviereck
left a comment
There was a problem hiding this comment.
Most of the homework is looking really good! I do have some questions/remarks here and there. If you can fix those I will approved the homework:)
| //Exercise 3: Log the number | ||
|
|
||
| let numberX; //step1 | ||
| console.log("x is a variable can be any number ") //step2 |
Contributor
There was a problem hiding this comment.
Ah I understand, but what is the value at this moment?
|
|
||
| //5-So now we have 'z' and 'a' find a way to compare the two values and store the highest of the two in a new variable. | ||
|
|
||
| const highest = a > z ? a : z; |
Contributor
There was a problem hiding this comment.
Ah, nice! Do you know that you can also use Math.max ?
| let colors = []; | ||
|
|
||
| //2-Write a 'console.log' statement that explains in words what you think the value of the array is. | ||
| console.log('this is the basic colors'); |
Contributor
There was a problem hiding this comment.
is this the value of the array?
| console.log('this is the basic colors'); | ||
|
|
||
| //3-Write a 'console.log' statement that logs the array. | ||
| console.log('["red", "green", "blue"]'); |
Contributor
There was a problem hiding this comment.
I think it should log the array colors
| //if z equals 13, and the only other statement is z = z % 2, the value of x after the calculation will be 1. | ||
| let z = 13; | ||
| z %= 2; | ||
| console.log(z); |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
this is a pull request from my GitHub fork to the original HackYourfuture/JavaScript1