DEV Community

Discussion on: Daily Coding Puzzles - Nov 11th - Nov 16th

Collapse
 
cookavich profile image
Paul Cook

Another JS solution:

const dontGiveMeFive = (start, end) => range(start, end).filter(noFive).length;
const range = (start, end) => [...Array(end - start + 1).keys()].map(i => i + start);
const noFive = num => !`${num}`.includes('5');