mirror of
https://github.com/swc-project/swc.git
synced 2024-12-23 05:32:09 +03:00
b887b30092
**Description:** This is required for https://github.com/swc-project/swc/pull/6981 and https://github.com/swc-project/swc/pull/6950
16 lines
410 B
TypeScript
16 lines
410 B
TypeScript
// @target: es5
|
|
|
|
var globalCounter = 0;
|
|
function incrementIdx(max: number) {
|
|
globalCounter += 1;
|
|
let idx = Math.floor(Math.random() * max);
|
|
return idx;
|
|
}
|
|
|
|
var array1 = [1, 2, 3, 4, 5];
|
|
|
|
array1[incrementIdx(array1.length)] **= 3;
|
|
|
|
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
|
|
|
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2; |