Skip to content
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

add task solution #2351

Closed
wants to merge 3 commits into from
Closed

add task solution #2351

wants to merge 3 commits into from

Conversation

Vayts
Copy link

@Vayts Vayts commented Jul 17, 2023

No description provided.

src/makeRobot.js Outdated
Comment on lines 54 to 60
},
get info() {
return `name: ${name}, chip version: ${version}, wheels: ${wheels}`;
},
get location() {
return `${this.name}: x=${this.coords.x}, y=${this.coords.y}`;
},
Copy link

Choose a reason for hiding this comment

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

add gaps here

src/makeRobot.js Outdated
y: 0,
},
get info() {
return `name: ${name}, chip version: ${version}, wheels: ${wheels}`;
Copy link

Choose a reason for hiding this comment

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

let's use 'this' here
If you will create a function to change these variables later - it will not work as expected without 'this'

src/makeRobot.js Outdated
Comment on lines 63 to 69
if (step < 1) {
return this;
}

this.coords.x -= step;

return this;
Copy link

Choose a reason for hiding this comment

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

think on how you can refactor it to get rid of double 'return this' statement

@Vayts Vayts requested a review from tiserett August 6, 2023 19:19
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

GJ,
Everything`s fine!

Copy link

@roman-mirzoian roman-mirzoian left a comment

Choose a reason for hiding this comment

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

Well done, but don`t forget about good code formating.

x: 0,
y: 0,
},
get info() {

Choose a reason for hiding this comment

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

Suggested change
get info() {
get info() {

@Vayts Vayts closed this by deleting the head repository Dec 13, 2023
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.

3 participants