*JS
const solution = (number) => {
return (number < 1 ? 0 : [...Array(number).keys()].filter(num => num % 3 == 0 || num % 5 == 0).reduce((a,b) => a+b));
}
*ruby
def solution(number)
(1...number).select { |num| num % 3 == 0 || num % 5 == 0 }.sum
end