Python Change Byte Array Value Javascript For Loop