You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// should return true[1,1,1].sameStructureAs([2,2,2]);[1,[1,1]].sameStructureAs([2,[2,2]]);// should return false [1,[1,1]].sameStructureAs([[2,2],2]);[1,[1,1]].sameStructureAs([[2],2]);// should return true[[[],[]]].sameStructureAs([[[],[]]]);// should return false[[[],[]]].sameStructureAs([[1,1]]);// should return false[1,'[',']'].sameStructureAs(['[',']',1]);
The text was updated successfully, but these errors were encountered:
在 Array 原型链上添加一个方法 sameStructureAs,用于比较该数组与接收参数的 嵌套结构是否一致。
示例:
The text was updated successfully, but these errors were encountered: