to store different mod values
let arr = new Array ( N ) ; arr . fill ( 0 ) ; let count = 0 ; while ( mod > 1 ) { arr [ count ++ ] = mod ; mod = phi [ mod ] ; } let result = 1 ; let loop = count + 1 ; arr [ count ] = 1 ;