function () {
return 1;
}
// The above is the same as...
() => {
return 1;
}
// All the code above create a un-reusable function. All of the code below creates a reusable function.
function a() {
return 1;
}
// The above code is the same as...
var a = function () {
return 1;
}
// The above code is the same as...
var a = () => {
return 1;
}
Top comments (0)