.map(x=>x+1)
                  
                  
                                                .filter( x => checker(x) === 2).length;
                  
                  
                  
                  
                  
                  const checker = (n) => {
                  
                  
                    let  res = 0;
                  
                  
                    for(let i = 1; i <= n; i++)  {
                  
                  
                      if(n%i === 0) res++;
                  
                  
                    }
                  
                  
                    return res;
                  
                  
                  }
                  
                  
                  
                  
                  
                  const resetNum = n => n < 0 ? 0 : Math.round(n)
                  
                  
                
break out from for loop if i is not mod
@TRGWII example code
Обсуждают сегодня