Koa,webstorm reported an error

clipboard.png

as shown in the picture, red, is there something wrong

Feb.28,2021

No mistake, it's just that the js standard set by your webstorm is too low, at least es6 . For more information on setting method, please see https://www.cnblogs.com/hcxy/p/7118579.html

.

in addition, uniform code style is recommended, such as this

const someLib = require('someLib');

someAsyncFunc(v => {
  someCode;
});

there are spaces or no spaces before and after the assignment sign, of course, if you do not consider cooperation, it is purely personal preference, for reference only.

Menu