-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
base: master
Are you sure you want to change the base?
js_task_make_robot #2477
Conversation
src/makeRobot.js
Outdated
this.coords.x = 1400; | ||
this.coords.y = 500; |
There was a problem hiding this comment.
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}` |
There was a problem hiding this comment.
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}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same with 'this' here
There was a problem hiding this 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}` |
There was a problem hiding this comment.
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.
No description provided.