What is 'DRY' in coding?

Asked by blessing007 · 6 months ago

1 Answer

55
amorebise · 6 months ago Top Answer

DRY stands for Don't Repeat Yourself. If you find yourself typing the same code three times, it should probably be a loop or a function.

Repeating yourself makes your code long and hard to fix. If you change a rule, you have to change it in three places! If it's DRY, you only change it once.

Log in to add a comment.