Stop nesting ternaries in JavaScript
Stop nesting ternaries in JavaScript
www.sonarsource.com Stop nesting ternaries in JavaScript
Nesting ternary operators makes code more complex and less clear. Let's investigate other ways to write conditional expressions.
You're viewing a single thread.
View all comments
34
comments
const statement = specificStatement ?? nonSpecificStatement ?? someStatement ?? unrelatedStatement ?? ‘idk’;
6 0 Reply
You've viewed 34 comments.
Scroll to top