=>
是es6语法中的arrow function
(x) => x + 6
相当于
function(x){
return x + 6; }; html:
<body>
<div class='wrapper'>
<button class='like-btn'>
<span class='like-text'>点赞</span>
<span>
=>
是es6语法中的arrow function
(x) => x + 6
相当于
function(x){
return x + 6; }; html:
<body>
<div class='wrapper'>
<button class='like-btn'>
<span class='like-text'>点赞</span>
<span>