Skip to content

Instantly share code, notes, and snippets.

View preciousuwhubetine's full-sized avatar
🏠
Working from home

Precious Uwhubetine preciousuwhubetine

🏠
Working from home
View GitHub Profile
const pets = ['Cat', 'Dog', 'Bird', 'Fish', 'Frog', 'Hamster', 'Pig', 'Horse', 'Lion', 'Dragon'];
// Print all pets
console.log(pets[0]);
console.log(pets[1]);
console.log(pets[2]);
console.log(pets[3]);
// Is it DRY?
// No. The code above is not DRY because there are repitions
// It can be made DRY by doing the following