Hi everybody
Finally, I found a solution to this challenge but is my code better than other’s ones?
I need an answer to these Questions:
what makes a code being considered as a Clean code?
what makes a code being considered as a Celever code?
what makes a code considered as a Best Practice code?
here is my code:
function mutation(arr) {
let newArr = [];
for(let i = 0; i < arr[1].length; i++){
var reg = new RegExp("[" + arr[1][i] + "]", "gi")
newArr.push(reg.test(arr[0]));
}
return newArr.filter(a => a).length === newArr.length;
}
where you can put my code?
- newbie
- clever
- Best Practice