Skip to content

Some changes on exercise 8.#9

Open
Stef-Lev wants to merge 25 commits intoSocialHackersClass10:masterfrom
Stef-Lev:master
Open

Some changes on exercise 8.#9
Stef-Lev wants to merge 25 commits intoSocialHackersClass10:masterfrom
Stef-Lev:master

Conversation

@Stef-Lev
Copy link

No description provided.

Copy link

@enNaDev enNaDev left a comment

Choose a reason for hiding this comment

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

Great! Nice job!

let array2 = [1, 2, 3, 4, 5, 6, 7];
//Console log
console.log(array1.length);
console.log(array2.length); No newline at end of file
Copy link

Choose a reason for hiding this comment

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

Good job but you forgot the last question of the exercise: Write a conditional statement that checks if both are of equal length..., thus should also include in your code:

if (array1.length === array2.length) {
    console.log("They are the same!");
} else {
    console.log("Two different sizes");
}

"use strict";
//1. The answer is 1. The number 6 can be divided by 3 so the remainder after the division is 1.
//2. The answer is 1. The number 20 can be divided by 4 so the remainder after the division is 1.
//3. The answer is 1. The number 12 can be divided by 2 so the remainder after the division is 1. No newline at end of file
Copy link

Choose a reason for hiding this comment

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

Correct! Here is also the way you can find every remainder (including huge number):

Let have:
5 / 2 = 2.5
Then we say, 2 * 2 = 4
Afterwards, 5 - 4 = 1

So in general is:
a / b = c.d
Then c * b = e,
And a - e = remainder

console.log(myString);
myString = "The Arkitekt";
console.log("My nickname as a music producer");
console.log(myString); No newline at end of file
Copy link

Choose a reason for hiding this comment

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

In line 2, the value of the variable myString is "Stefanos Leventis", which happens to be your full name! So, if we want to be 100% precise, the line 3 instead, should be console.log("Stefanos Leventis");

In the line 6, same as above, the new value of the myString is "The Arkitekt", which again, happens to be your nickname as a music producer...

;-D ...yeah yeah I know....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants