Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Some changes on exercise 8. #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: master
Choose a base branch
from

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);
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.
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);
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