JSLint reports unexpected use of '&' and '|' — I'd like to clean this

前端 未结 3 2252

I\'m trying to get my Javascript code 100% JSLint clean.

I\'ve got some JS code that I\'ve lifted from elsewhere to create a UUID. That code has the following line:

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-01-31 14:38

    Did you give it the bitwise option? That option warns on all uses of bitwise operations, as they tend to be inefficient in Javascript (the native floats need to be converted to ints for the bitwise operation, and then converted back)

提交回复
热议问题