for(var i in aArray) VS for(i=0; i<aArray.length; i++)

前端 未结 6 876
挽巷
挽巷 2021-01-07 10:20

I just want to ask if the in_array_orig and in_array_new is just the same. and also im confused on the result when comparing both array (<

6条回答
  •  不知归路
    2021-01-07 10:52

    if the in_array_orig and in_array_new is just the same

    Yes, they are. (same behavior)

    im confused on the result when comparing both array (aArr1 vs aArr2)

    We can't compare array like this: aArr1 == aArr2

提交回复
热议问题