The
ifstatement executes a statementifa specified condition is truthy.(c) MDN
🐊Putout plugin adds ability to merge if statements.
npm i @putout/plugin-merge-if-statements
{
"rules": {
"merge-if-statements": "on"
}
}if (a > b) {
if (b < c) {
console.log('hello');
}
}if (a > b && b < c) {
console.log('hello');
}MIT