箭頭函式
箭頭函式是在 ECMAScript 6 中定義函式的新方法。
// traditional way of declaring and defining function
var sum = function(a,b)
{
return a+b;
}
// Arrow Function
let sum = (a, b)=> a+b;
//Function defination using multiple lines
let checkIfEven = (a) => {
if( a % 2 == 0 )
return true;
else
return false;
}