As we have to check divisibility by three numbers , So we can implement bit masking
var multiple = [ 2 , 3 , 5 ] ; var count = 0 , mask = parseInt ( Math . pow ( 2 , 3 ) ) ; for ( i = 1 ; i < mask ; i ++ ) {