All Questions
1 question
0
votes
3
answers
1k
views
Eliminate duplicate code in nested IFs without creating a function [duplicate]
Let's say we have two ifs that depend on each other:
if var exists {
if var is array {
//Do stuff with var
} else {
//Resolve the problem
}
} else {
//Resolve the ...