I have recently realized that an Arrow function of Javascript can be even shorter than the traditional one, like this: _ => null
But I am unsure if there will be any performance cost over () => null
.
If the unnamed variable in Javascript is similar to Java, then there shouldn’t be any memory allocation, so there won’t be any extra memory overhead.
I would like to know an expert’s opinion on this.
Thank you for your time.