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} 32for(let i25 = 0;i25<1;i25++){ 33 for(let i = 0;i<1;i++){ 34 i25 = v0.pop(); 35 } 36} 37for(let i25 = 0;i25<1;i25++){ 38 for(let i = 0;i<1;i++){ 39 i25 = v0.forEach(()=>{}); 40 } 41} 42for(let i25 = 0;i25<1;i25++){ 43 for(let i = 0;i<1;i++){ 44 i25 = v0.find(()=>{}); 45 } 46} 47for(let i25 = -1;i25<0;i25++){ 48 for(let i = 0;i<1;i++){ 49 i25 = v0.findIndex(()=>{}); 50 } 51} 52for(let i25 = 0;i25<1;i25++){ 53 for(let i = 0;i<1;i++){ 54 i25 = v0.every(()=>{}); 55 } 56} 57 58for(let i25 = 0;i25<1;i25++){ 59 for(let i = 0;i<1;i++){ 60 i25 = v0.sort(); 61 } 62} 63const buffer = new ArrayBuffer(16); 64for(let i25 = 0;i25<1;i25++){ 65 for(let i = 0;i<1;i++){ 66 i25 = ArrayBuffer.isView(buffer); 67 } 68} 69const map = new Map([[1, 'one'], [2, 'two']]); 70for(let i25 = 0;i25<1;i25++){ 71 for(let i = 0;i<1;i++){ 72 i25 = map.keys(); 73 } 74} 75for(let i25 = 0;i25<1;i25++){ 76 for(let i = 0;i<1;i++){ 77 i25 = map.values(); 78 } 79} 80 81for(let i25 = 0;i25<1;i25++){ 82 for(let i = 0;i<1;i++){ 83 i25 = map.entries(); 84 } 85} 86 87const set = new Set([1, 2, 2, 3]); 88for(let i25 = 0;i25<1;i25++){ 89 for(let i = 0;i<1;i++){ 90 i25 = set.keys(); 91 } 92} 93for(let i25 = 0;i25<1;i25++){ 94 for(let i = 0;i<1;i++){ 95 i25 = set.values(); 96 } 97} 98 99for(let i25 = 0;i25<1;i25++){ 100 for(let i = 0;i<1;i++){ 101 i25 = set.entries(); 102 } 103} 104 105print(arr.findIndex((num)=>{return num>2})); 106print(arr.find((num)=>{return num>2}))