Skip to content

Instantly share code, notes, and snippets.

View abdallahmalima's full-sized avatar

Abdallah Antony abdallahmalima

View GitHub Profile
@abdallahmalima
abdallahmalima / dry.js
Last active November 12, 2022 02:13
Test if code is DRY
/*=======================================*\
this code does Not follow DRY principle
\*=======================================*/
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]);