I have a quick question as I'm still learning arrow functions. I understand that they implicitly return, and we can use implicit returns with expressions. However, my question is about the following scenario:
$scope.setEdit = () => { $scope.edit = true; }
Can I simplify it to
$scope.setEdit = () => $scope.edit = true;
without any unexpected side effects? I'm not sure how arrow functions behave when used for simple variable assignments. So far, I have only used them in places where I would normally include a return statement, not for simple assignments.
This example is just to illustrate my question. Thank you!