Atomics.sub()
Atomics.sub() 静态方法减去数组中给定位置处的给定值并返回该位置处的旧值。此原子操作保证在修改的值被写回之前不会发生其他写入。
  ¥The Atomics.sub() static method subtracts a given value
  at a given position in the array and returns the old value at that position. This atomic
  operation guarantees that no other write happens until the modified value is written
  back.
Try it
语法
参数
¥Parameters
- typedArray
- 
    整数类型数组。 Int8Array、Uint8Array、Int16Array、Uint16Array、Int32Array、Uint32Array、BigInt64Array或BigUint64Array之一。
- index
- 
    typedArray中要从中减去value的位置。
- value
- 
    要减去的数字。 
返回值
例外情况
示例
使用子
规范
| Specification | 
|---|
| ECMAScript Language Specification # sec-atomics.sub | 
浏览器兼容性
BCD tables only load in the browser
也可以看看
¥See also