Answer the question
In order to leave comments, you need to log in
What does eslint want?
Hello!
So I took it upon myself to check my mini tutorial code with a linter, and there is such an error
12:17 warning No magic number: 2 no-magic-numbers
12:41 warning No magic number: 2 no-magic-numbers
What can this mean? I so understood from the documentation that it is connected with variables. In these lines, my variables appear in the expression.
Who faced? Or maybe you just know English better, please help me figure it out.
Thank you for your responses.
Here is my code
let a1,a2,b1,b2,c1,c2;
a1 = +prompt('enter first A point');
a2 = +prompt('enter second A point');
b1 = +prompt('enter first B point');
b2 = +prompt('enter second B point');
c1 = +prompt('enter first C point');
c2 = +prompt('enter second C point');
if ((a1 + b1) / 2 === c1 && (a2 + b2) / 2 === c2) {
console.log('true')
} console.log('false');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question