Simple Javascript Solution
```\nvar flipAndInvertImage = function(A) {\n\t\tfor(let row in A) {\n\t\t\tA[row] = A[row].reverse();\n\t\t\tA[row] = A[row].map(x => 1 - x);\n\t\t}\n\treturn 
```\nvar flipAndInvertImage = function(A) {\n\t\tfor(let row in A) {\n\t\t\tA[row] = A[row].reverse();\n\t\t\tA[row] = A[row].map(x => 1 - x);\n\t\t}\n\treturn A;\n};
['JavaScript']