• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16const arr = [1,2,3,4];
17try{
18    arr.map(-123456);
19    arr.some(-123456);
20    arr.every(-123456);
21    arr.forEach(-123456);
22    arr.find(-123456);
23    arr.findIndex(-123456);
24}catch(e){}
25
26const v0 = []
27for(let i25 = 0; i25 < 1; i25++){
28    for(let i = 0; i < 1; i++){
29        i25 = v0.some(()=>{});
30    }
31}
32
33for(let i25 = 0; i25 < 1; i25++){
34    for(let i = 0; i < 1; i++){
35        i25 = v0.pop();
36    }
37}
38
39for(let i25 = 0; i25 < 1; i25++){
40    for(let i = 0; i < 1; i++){
41        i25 = v0.forEach(()=>{});
42    }
43}
44
45for(let i25 = 0; i25 < 1; i25++){
46    for(let i = 0; i < 1; i++){
47        i25 = v0.find(()=>{});
48    }
49}
50
51for(let i25 = -1; i25 < 0; i25++){
52    for(let i = 0; i < 1; i++){
53        i25 = v0.findIndex(()=>{});
54    }
55}
56
57for(let i25 = 0; i25 < 1; i25++){
58    for(let i = 0; i < 1; i++){
59        i25 = v0.every(()=>{});
60    }
61}
62
63for(let i25 = 0; i25 < 1; i25++){
64    for(let i = 0; i < 1; i++){
65        i25 = v0.sort();
66    }
67}
68const buffer = new ArrayBuffer(16);
69for(let i25 = 0; i25 < 1; i25++){
70    for(let i = 0; i < 1; i++){
71        i25 = ArrayBuffer.isView(buffer);
72    }
73}
74const map = new Map([[1, 'one'], [2, 'two']]);
75for(let i25 = 0; i25 < 1; i25++){
76    for(let i = 0; i < 1; i++){
77        i25 = map.keys();
78    }
79}
80
81for(let i25 = 0; i25 < 1; i25++){
82    for(let i = 0; i < 1; i++){
83        i25 = map.values();
84    }
85}
86
87for(let i25 = 0; i25 < 1; i25++){
88    for(let i = 0; i < 1; i++){
89        i25 = map.entries();
90    }
91}
92
93const set = new Set([1, 2, 2, 3]);
94for(let i25 = 0; i25 < 1; i25++){
95    for(let i = 0; i < 1; i++){
96        i25 = set.keys();
97    }
98}
99
100for(let i25 = 0; i25 < 1; i25++){
101    for(let i = 0; i < 1; i++){
102        i25 = set.values();
103    }
104}
105
106for(let i25 = 0; i25 < 1; i25++){
107    for(let i = 0; i < 1; i++){
108        i25 = set.entries();
109    }
110}
111
112let str = "sd-93u498thikefnow8y3-0rh1nalksfnwo8y3t19-3r8hoiefnw"
113for(let i25 = 0; i25 < 1; i25++){
114    for(let i = 0; i < 1; i++){
115        i25 = str.substring(0);
116    }
117}
118
119for(let i25 = 0; i25 < 1; i25++){
120    for(let i = 0; i < 1; i++){
121        i25 = str.substr(-0.01, 100)
122    }
123}
124
125for(let i25 = 0; i25 < 1; i25++){
126    for(let i = 0; i < 1; i++){
127        i25 =  str.slice(0)
128    }
129}
130
131print(arr.findIndex((num)=>{return num>2}));
132print(arr.find((num)=>{return num>2}))