Improve your JavaScript Code Part - 1
· 3 min read
Avoid too many nested If Else
Nested if-else statements should be avoided. Maintain the code's linearity and simplicity.
Consider using an if-else statement that is nested and does not take advantage of the power of the return statement.