Skip to content
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
HaniBadran:master
Closed

Hani's homework of javascript-week1#211
HaniBadran wants to merge 3 commits intoHackYourFuture:masterfrom
HaniBadran:master

Conversation

@HaniBadran
Copy link

this is a pull request from my GitHub fork to the original HackYourfuture/JavaScript1

Copy link
Contributor

@marcianoviereck marcianoviereck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"]');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@NoerGitKat NoerGitKat closed this Jun 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants