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

js_task_make_robot #2477

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

js_task_make_robot #2477

wants to merge 2 commits into from

Conversation

annak1104
Copy link

No description provided.

src/makeRobot.js Outdated
Comment on lines 95 to 96
this.coords.x = 1400;
this.coords.y = 500;
Copy link

Choose a reason for hiding this comment

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

get rid of magic values

src/makeRobot.js Outdated

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 ever want to create a function to change these variables - it's not gonna work properly without 'this'

src/makeRobot.js Outdated

get location() {
return (
`${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.

same with 'this' here

Copy link

@dffUqp dffUqp left a comment

Choose a reason for hiding this comment

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

GJ✔️


get info() {
return (
`name: ${this.name}, chip version: ${this.version}, wheels: ${this.wheels}`
Copy link

Choose a reason for hiding this comment

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

You can disable this linter error or fix it😀

Next time please don't push the code with error.

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