I was not comfortable with this syntax the first time I learnt this and hence even though it makes sense now, I still write it in two different lines so it would be easier for everyone reading.
constintermediateFn=something();// something returns a functionconstresult=intermediateFn();// calling the fn returned from something
I was not comfortable with this syntax the first time I learnt this and hence even though it makes sense now, I still write it in two different lines so it would be easier for everyone reading.
If you are familiar with React, this syntax is what is used with Redux connect or Apollo's graphql.