Back

vuejs - emscript 中的 arrow 函数的详细解释

发布时间: 2021-06-02 06:46:00

参考;https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions

简而言之:

(x) => x + x 

=> ,不是 ->

只有一行时, 大括号可以省略。

return可以省略。 

(x) 中,( 和 ) 也可以省略。 

如果报错的话,就一点点给他们加回去。

Back