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
16/*
17 * @tc.name:createobject
18 * @tc.desc:test createobject
19 * @tc.type: FUNC
20 * @tc.require: issueIA955Y
21 */
22let originObject = {
23  0: "lighter",
24  1: "normal",
25  2: "regular",
26  3: "medium",
27  4: "bold",
28  5: "bolder",
29  100: "100",
30  200: "200",
31  300: "300",
32  400: "400",
33  500: "500",
34  600: "600",
35  700: "700",
36  800: "800",
37  900: "900",
38  func1: function(a) {
39    print(a);
40  },
41  func2: function(a, b) {
42    print(a + b);
43  }
44}
45
46Object.keys(originObject).forEach(
47  function(key) {
48      print(key);
49      print(originObject[key]);
50  }
51);
52originObject.func1("wode");
53originObject.func2("wode", 5);