How to decide between var, let and const for writing arrow functions?

There is an existing code-base and for Code consistency, we are switching to arrow functions where functions are being called from other files also
So, How to decide between var, let and const for writing arrow functions?

const

var is effectively obselete (only some specific edge case uses) and you’re surely never going to reassign the function so let is incorrect.

Doesn’t really smell like a good idea: arrow functions follow slightly different rules, blindly replacing just to make it look more consistent seems a little dangerous. Also asking the original question suggests you need knowledge of basics, which again points to this not being a great idea, but hey might be fine

1 Like