Function that returns true if the the sum of all the perfect squares of the given array is divisible by x
function check ( arr , x , n ) { let sum = 0 ; for ( let i = 0 ; i < n ; i ++ ) { let y = Math . sqrt ( arr [ i ] ) ;