JavaScript Endian Encoding?

后端 未结 6 1339
清歌不尽
清歌不尽 2021-02-04 10:18

A response on SO got me thinking, does JavaScript guarantee a certain endian encoding across OSs and browsers?

Or put another way are bitwise shifts on integers \"safe\"

6条回答
  •  长发绾君心
    2021-02-04 11:08

    JavaScript doesn't have an integer type, only a floating point type. You can never get close enough to the implementation details to worry about this.

提交回复
热议问题