# Copyright (c) 2023 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. a,b,c,d a,b,c,d a,e,c,d a,b,c,d 0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2 方,舟 方,舟 0 0 1 1 10000 1,2,3,4 {"0":1,"1":2,"2":3,"3":4,"length":4} defineProperty 0 defineProperty 1 defineProperty 2 defineProperty 3 set length get toJSON get 0 get 1 get 2 get 3 get length {"0":1,"1":2,"2":3,"3":4,"length":4} defineProperty 0 defineProperty 1 defineProperty 2 defineProperty 3 set length get toJSON get length get 0 get 1 get 2 get 3 [1,2,3,4] get iterator get length get 0 get length get 1 get length get 2 get length get length get length get length get length get length get length get length [0,1,2,null,null,null,null,null,null,null] get 0 ["x",2,3,4,5] function Number() { [native code] } [null,1,null,null,null,null,null,null,null,null] get iterator get length get 0 get length get 1 get length get 2 get length get length get length get length get length get length get length get length [0,1,2,null,null,null,null,null,null,null] [1,2,3] [null,null,null] [{},{},{}] [[],[],[]] [[1,2,3],[1,2,3],[1,2,3]] [0,0,0] true get JSArray from arrayLike Success [1,2,3] [2.2,24,"ssss"] [[0],[2],[4]] [[0],[2],[4]] true get JSArray from JSArray Success! [1,2,3,4,5] [1,2,3,4,5] ["as","as","as","as","as","as","as","as","as","as"] result check successfully ["test","for","array","from","set"] [[1,"test"],[2,"for"],[3,"array"],[4,"from"],[5,"map"]] [2,4,6,8,10,12] [2,4,6,8,10,12] [2,4,6,8,10,12] [2,4,6,8,10,12] [2,4,6,8,10,12]