JavaScript arrow syntax: What does the equals sign on the right hand side mean?
问题 I am studying JavaScript syntax. I occasionally see a pattern that confuses me: an equals sign on the right hand side of the arrow. For example, something like this: .then(data => myVariable = data) I don't know what is going on in that syntax. It looks like it is taking the value of data and assigning it to the variable named myVariable . Can somebody explain this? 回答1: You're right. It's an arrow function (without an accompanying block) that "returns" an assignment expression - in effect