How to flip normal in BufferGeometry?

How to flip normal in BufferGeometry? current normal is from inside to outside, I want to flip that.

``````var geometry = new THREE.BufferGeometry();

var vertices = new Float32Array([
0, 0, 0,
80, 0, 0,
80, 80, 0,
0, 80, 0,
]);

var attribue = new THREE.BufferAttribute(vertices, 3);

geometry.attributes.position = attribue
var normals = new Float32Array([
0, 0, 1,
0, 0, 1,
0, 0, 1,
0, 0, 1,
]);

geometry.attributes.normal = new THREE.BufferAttribute(normals, 3);

var indexes = new Uint16Array([
0, 1, 2, 0, 2, 3,
])

geometry.index = new THREE.BufferAttribute(indexes, 1);

var uvs = new Float32Array([
0,0,
1,0,
1,1,
0,1,
]);

geometry.attributes.uv = new THREE.BufferAttribute(uvs, 2);
``````

``````geom.applyMatrix4(new Matrix4().makeScale(-1, 1, 1));//flip the normals
``````
``````    let temp;
for ( let i = 0; i < geometry.index.array.length; i += 3 ) {
// swap the first and third values
temp = geometry.index.array[ i ];
geometry.index.array[ i ] = geometry.index.array[ i + 2 ];
geometry.index.array[ i + 2 ] = temp;
}

``````