my mind is blank and I can't think of the solution...
I have the following code:
if (onlySelected === true) {
if (r.selected == true) {
result.push(pushValue);
}
}
else {
result.push(pushValue);
}
how can I simplify this code into this:
if (condition) { result.push(pushValue) }