JSLint: Unexpected assignment expression
问题 I get this warning: Unexpected assignment expression. return task.completed = true; // Line 63, Pos 39 When using this code: completeAll: function () { this.tasks = this.tasks.filter(function (task) { return task.completed = true; }); } Why? And how else could I write this expression to avoid JSLint throwing warnings? P.S. The codeblock is taken from the Vue TodoMVC Example here: http://todomvc.dev/examples/vue/, therefore I assume that code review must have already been happened. 回答1: It's