arrow functions that return arrow functions that return arrow functions
I'm not a JavaScript person, nor much of a developer at all. This sounds okay to me, and like something that might happen to me if I wrote a bunch of JS, can you elaborate on why it isn't? Is it just a smell, i.e. you should be using classes better?
stinky stinky stinky. If you convert it back to normal functions and it looks like an abomination, you're coding wrong.
function (x) {
return function (y) {
return function (z,a) {
return function (z) {
return function (a) {
return b;
};
};
};
};
}
It's the same for nested ternaries. It is the result of someone being clever and trying to put everything into one line. Being clever is the fastest way to writing bad code.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm not a JavaScript person, nor much of a developer at all. This sounds okay to me, and like something that might happen to me if I wrote a bunch of JS, can you elaborate on why it isn't? Is it just a smell, i.e. you should be using classes better?
stinky stinky stinky. If you convert it back to normal functions and it looks like an abomination, you're coding wrong.
It's the same for nested ternaries. It is the result of someone being clever and trying to put everything into one line. Being clever is the fastest way to writing bad code.