minPositive and maxNegative will store smallest positive and smallest negative integer respectively .
let sum = 0 , minPositive = Number . MAX_SAFE_INTEGER , maxNegative = Number . MIN_SAFE_INTEGER ; for ( let i = 0 ; i < n ; i ++ ) {