Example will be my solution for this step.
I did it like this:
function reverseString(str) {
return str.split('').reverse().join('');
}
reverseString("hello");
In the above we have 3 methods in one line, I personally consider it’s readable.
What if we have like 8 methods in one line:
string.method1().method2().method3().method4().method5().method6().....
For me it’s a bit much.
Any best practices in terms of “how complex line of code should be”?