3 ms·
When I come across a situation like that, i consider the chunk of code reusable and split it into a separate function. It may not be perfect and you might need
by freemium413 5y ago
When I come across a situation like that, i consider the chunk of code reusable and split it into a separate function. It may not be perfect and you might need to make that function more generic than it was but I think it makes sense.