• Kempeth@feddit.de
    link
    fedilink
    arrow-up
    5
    ·
    5 months ago

    Basically if you need the same logic in two places instead of copying it to the second place you make it into a function and use that function in both places.

    That way if you need that logic to change you only need to make that edit once regardless of whether you use it one time or one thousand times.