mirror of
https://github.com/swc-project/swc.git
synced 2024-12-18 19:21:33 +03:00
6896a83d54
swc_ecma_codegen: - Emit pending semi on `~`. (#2091)
8 lines
195 B
JavaScript
8 lines
195 B
JavaScript
function test(list) {
|
|
let cur = list.findIndex(p => p == 1);
|
|
if (!~cur) {
|
|
cur = list.findIndex(p => p !== 0);
|
|
}
|
|
for (const val of list) cur += val.value;
|
|
return cur;
|
|
} |