code: function not(arr) {
                  var ans = new Array(arr.length);
                  for (var i = 0; i < ans.length; i++)
                      ans[i] = ~arr[i];
                  return ans;
              }
docs: Logical NOT operation
  @param {Array} arr
  @return {Array}