1/* 2 Copyright (c) 2023 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 16 17 try { 18 try { 19 a = 1; 20 } catch (e) { 21 a; 22 } 23 if (a == "") { 24 throw "null"; 25 } 26 if (x > 100) { 27 throw "max"; 28 } else { 29 throw "min"; 30 } 31} 32catch (err) { 33 func0(a, 10); 34} 35finally { 36 console.log("error"); 37} 38 39var car = ["B", "V", "p", "F", "A"]; 40var text = ""; 41var i; 42for (i = 0; i < 5; i++) { 43 text += car[i] + x + y; 44} 45function func0(x, y) { 46 var a = x + y; 47 return a; 48} 49function func5(a) { 50 var a = 1; 51 if (a) { 52 return a; 53 } 54 else { 55 a += 1; 56 } 57}