JavaScript, be more specific in array comparision

前端 未结 0 1179
暖寄归人
暖寄归人 2021-01-13 05:35

I\'m wondering if there is a short way to compare two arrays like:

[1, 2, 3, 4] === [1, 2, *, 4] // where * is any value, I want this expression to be true


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题