The code you have given has absolutely no relevancy to endianess.
However, if you were to reinterpret the byte array in say uint32 array, then the result would be different depending on the endianess of the machine the browser runs on.
First, fix the bug in the code:
function uInt32ToLEByteArray(n) {
var byteArray = new Uint8Array(4);
for (var i = 0; i < 4; i++) {
byteArray[i] = n & 255;
n >>>= 8; //simply doing n >> 8 has no effect actually
}
return byteArray;
}
Then
var a = uInt32ToLEByteArray(0xFF)
console.log(a);
//always [255, 0, 0, 0]
var b = new Uint32Array(a.buffer);
console.log(b);
//[255] on little endian machines
//[4278190080] on big endian machines