E
E
Elena2020-09-17 18:43:07
Linter
Elena, 2020-09-17 18:43:07

How to write code correctly so that Eslint does not swear?

The linter swears, I can not understand. I went to the Eslint dock, but I didn’t figure out what exactly the error was

function findVowels(num) {
  let n = 0;
  for (let i = 10; i <= num; i += 1) {
    [i].join('').split('').forEach(item => {
      if (item === '0') {
        n++;
      }
    });
  }
  return n;
}

5f6383f3b69e7903063849.png

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question