lotus-1 / LuckyPicture

week-2 Project
0 stars 3 forks source link

Repetitive code #21

Open MynahMarie opened 5 years ago

MynahMarie commented 5 years ago

You are creating the same variable 3 times inside 3 different functions and manipulating it in a very similar way. This is a good example of code that should be abstracted out into possibly its own function.

https://github.com/lotus-1/LuckyPicture/blob/c043ca6ce3739ad1924a66eab0d846a2ebf096e6/index.js#L2-L10